Class GraphqlApiProps
Properties for an AppSync GraphQL API.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GraphqlApiProps : Object, IGraphqlApiProps
Syntax (vb)
Public Class GraphqlApiProps
Inherits Object
Implements IGraphqlApiProps
Remarks
ExampleMetadata: infused
Examples
var sourceApi = new GraphqlApi(this, "FirstSourceAPI", new GraphqlApiProps {
Name = "FirstSourceAPI",
Definition = Definition.FromFile(Join(__dirname, "appsync.merged-api-1.graphql"))
});
var importedMergedApi = GraphqlApi.FromGraphqlApiAttributes(this, "ImportedMergedApi", new GraphqlApiAttributes {
GraphqlApiId = "MyApiId",
GraphqlApiArn = "MyApiArn"
});
var importedExecutionRole = Role.FromRoleArn(this, "ExecutionRole", "arn:aws:iam::ACCOUNT:role/MyExistingRole");
new SourceApiAssociation(this, "SourceApiAssociation2", new SourceApiAssociationProps {
SourceApi = sourceApi,
MergedApi = importedMergedApi,
MergeType = MergeType.MANUAL_MERGE,
MergedApiExecutionRole = importedExecutionRole
});
Synopsis
Constructors
GraphqlApiProps() |
Properties
AuthorizationConfig | Optional authorization configuration. |
Definition | Definition (schema file or source APIs) for this GraphQL Api. |
DomainName | The domain name configuration for the GraphQL API. |
EnvironmentVariables | A map containing the list of resources with their properties and environment variables. |
IntrospectionConfig | A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection. |
LogConfig | Logging configuration for this api. |
Name | the name of the GraphQL API. |
QueryDepthLimit | A number indicating the maximum depth resolvers should be accepted when handling queries. |
ResolverCountLimit | A number indicating the maximum number of resolvers that should be accepted when handling queries. |
Schema | (deprecated) GraphQL schema definition. Specify how you want to define your schema. |
Visibility | A value indicating whether the API is accessible from anywhere (GLOBAL) or can only be access from a VPC (PRIVATE). |
XrayEnabled | A flag indicating whether or not X-Ray tracing is enabled for the GraphQL API. |
Constructors
GraphqlApiProps()
public GraphqlApiProps()
Properties
AuthorizationConfig
Optional authorization configuration.
public IAuthorizationConfig AuthorizationConfig { get; set; }
Property Value
Remarks
Default: - API Key authorization
Definition
Definition (schema file or source APIs) for this GraphQL Api.
public Definition Definition { get; set; }
Property Value
DomainName
The domain name configuration for the GraphQL API.
public IDomainOptions DomainName { get; set; }
Property Value
Remarks
The Route 53 hosted zone and CName DNS record must be configured in addition to this setting to enable custom domain URL
Default: - no domain name
EnvironmentVariables
A map containing the list of resources with their properties and environment variables.
public IDictionary<string, string> EnvironmentVariables { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
There are a few rules you must follow when creating keys and values:
Default: - No environment variables.
IntrospectionConfig
A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection.
public Nullable<IntrospectionConfig> IntrospectionConfig { get; set; }
Property Value
System.Nullable<IntrospectionConfig>
Remarks
Default: IntrospectionConfig.ENABLED
LogConfig
Logging configuration for this api.
public ILogConfig LogConfig { get; set; }
Property Value
Remarks
Default: - None
Name
the name of the GraphQL API.
public string Name { get; set; }
Property Value
System.String
QueryDepthLimit
A number indicating the maximum depth resolvers should be accepted when handling queries.
public Nullable<double> QueryDepthLimit { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Value must be withing range of 0 to 75
Default: - The default value is 0 (or unspecified) which indicates no maximum depth.
ResolverCountLimit
A number indicating the maximum number of resolvers that should be accepted when handling queries.
public Nullable<double> ResolverCountLimit { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Value must be withing range of 0 to 10000
Default: - The default value is 0 (or unspecified), which will set the limit to 10000
Schema
(deprecated) GraphQL schema definition. Specify how you want to define your schema.
public ISchema Schema { get; set; }
Property Value
Remarks
SchemaFile.fromAsset(filePath: string) allows schema definition through schema.graphql file
Default: - schema will be generated code-first (i.e. addType, addObjectType, etc.)
Stability: Deprecated
Visibility
A value indicating whether the API is accessible from anywhere (GLOBAL) or can only be access from a VPC (PRIVATE).
public Nullable<Visibility> Visibility { get; set; }
Property Value
System.Nullable<Visibility>
Remarks
Default: - GLOBAL
XrayEnabled
A flag indicating whether or not X-Ray tracing is enabled for the GraphQL API.
public Nullable<bool> XrayEnabled { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false