Show / Hide Table of Contents

Interface IGraphqlApiProps

Properties for an AppSync GraphQL API.

Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IGraphqlApiProps
Syntax (vb)
Public Interface 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

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.

OwnerContact

The owner contact information for an API resource.

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.

Properties

AuthorizationConfig

Optional authorization configuration.

IAuthorizationConfig? AuthorizationConfig { get; }
Property Value

IAuthorizationConfig

Remarks

Default: - API Key authorization

Definition

Definition (schema file or source APIs) for this GraphQL Api.

Definition? Definition { get; }
Property Value

Definition

Remarks

ExampleMetadata: infused

DomainName

The domain name configuration for the GraphQL API.

IDomainOptions? DomainName { get; }
Property Value

IDomainOptions

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.

IDictionary<string, string>? EnvironmentVariables { get; }
Property Value

IDictionary<string, 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.

    IntrospectionConfig? IntrospectionConfig { get; }
    Property Value

    IntrospectionConfig?

    Remarks

    Default: IntrospectionConfig.ENABLED

    LogConfig

    Logging configuration for this api.

    ILogConfig? LogConfig { get; }
    Property Value

    ILogConfig

    Remarks

    Default: - None

    Name

    the name of the GraphQL API.

    string Name { get; }
    Property Value

    string

    Remarks

    ExampleMetadata: infused

    OwnerContact

    The owner contact information for an API resource.

    string? OwnerContact { get; }
    Property Value

    string

    Remarks

    This field accepts any string input with a length of 0 - 256 characters.

    Default: - No owner contact.

    QueryDepthLimit

    A number indicating the maximum depth resolvers should be accepted when handling queries.

    double? QueryDepthLimit { get; }
    Property Value

    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.

    double? ResolverCountLimit { get; }
    Property Value

    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.

    [Obsolete("use Definition.schema instead")]
    ISchema? Schema { get; }
    Property Value

    ISchema

    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).

    Visibility? Visibility { get; }
    Property Value

    Visibility?

    Remarks

    Default: - GLOBAL

    XrayEnabled

    A flag indicating whether or not X-Ray tracing is enabled for the GraphQL API.

    bool? XrayEnabled { get; }
    Property Value

    bool?

    Remarks

    Default: - false

    Back to top Generated by DocFX