Interface GraphqlApiProps

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:14.666Z") @Stability(Stable) public interface GraphqlApiProps extends
Properties for an AppSync GraphQL API.


 GraphqlApi sourceApi = GraphqlApi.Builder.create(this, "FirstSourceAPI")
         .definition(Definition.fromFile(join(__dirname, "appsync.merged-api-1.graphql")))
 IGraphqlApi importedMergedApi = GraphqlApi.fromGraphqlApiAttributes(this, "ImportedMergedApi", GraphqlApiAttributes.builder()
 IRole importedExecutionRole = Role.fromRoleArn(this, "ExecutionRole", "arn:aws:iam::ACCOUNT:role/MyExistingRole");
 SourceApiAssociation.Builder.create(this, "SourceApiAssociation2")
  • Method Details

    • getName

      @Stability(Stable) @NotNull String getName()
      the name of the GraphQL API.
    • getAuthorizationConfig

      @Stability(Stable) @Nullable default AuthorizationConfig getAuthorizationConfig()
      Optional authorization configuration.

      Default: - API Key authorization

    • getDefinition

      @Stability(Stable) @Nullable default Definition getDefinition()
      Definition (schema file or source APIs) for this GraphQL Api.
    • getDomainName

      @Stability(Stable) @Nullable default DomainOptions getDomainName()
      The domain name configuration for the GraphQL API.

      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

    • getEnvironmentVariables

      @Stability(Stable) @Nullable default Map<String,String> getEnvironmentVariables()
      A map containing the list of resources with their properties and environment variables.

      There are a few rules you must follow when creating keys and values:

      • Keys must begin with a letter.
      • Keys must be between 2 and 64 characters long.
      • Keys can only contain letters, numbers, and the underscore character (_).
      • Values can be up to 512 characters long.
      • You can configure up to 50 key-value pairs in a GraphQL API.

      Default: - No environment variables.

    • getIntrospectionConfig

      @Stability(Stable) @Nullable default IntrospectionConfig getIntrospectionConfig()
      A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection.

      Default: IntrospectionConfig.ENABLED

    • getLogConfig

      @Stability(Stable) @Nullable default LogConfig getLogConfig()
      Logging configuration for this api.

      Default: - None

    • getQueryDepthLimit

      @Stability(Stable) @Nullable default Number getQueryDepthLimit()
      A number indicating the maximum depth resolvers should be accepted when handling queries.

      Value must be withing range of 0 to 75

      Default: - The default value is 0 (or unspecified) which indicates no maximum depth.

    • getResolverCountLimit

      @Stability(Stable) @Nullable default Number getResolverCountLimit()
      A number indicating the maximum number of resolvers that should be accepted when handling queries.

      Value must be withing range of 0 to 10000

      Default: - The default value is 0 (or unspecified), which will set the limit to 10000

    • getSchema

      @Stability(Deprecated) @Deprecated @Nullable default ISchema getSchema()
      use Definition.schema instead
      (deprecated) GraphQL schema definition. Specify how you want to define your schema.

      SchemaFile.fromAsset(filePath: string) allows schema definition through schema.graphql file

      Default: - schema will be generated code-first (i.e. addType, addObjectType, etc.)

    • getVisibility

      @Stability(Stable) @Nullable default Visibility getVisibility()
      A value indicating whether the API is accessible from anywhere (GLOBAL) or can only be access from a VPC (PRIVATE).

      Default: - GLOBAL

    • getXrayEnabled

      @Stability(Stable) @Nullable default Boolean getXrayEnabled()
      A flag indicating whether or not X-Ray tracing is enabled for the GraphQL API.

      Default: - false

    • builder

      @Stability(Stable) static GraphqlApiProps.Builder builder()
      a GraphqlApiProps.Builder of GraphqlApiProps