GraphqlApiProps

class aws_cdk.aws_appsync.GraphqlApiProps(*, name, authorization_config=None, domain_name=None, log_config=None, schema=None, xray_enabled=None)

Bases: object

(experimental) Properties for an AppSync GraphQL API.

Parameters:
  • name (str) – (experimental) the name of the GraphQL API.

  • authorization_config (Union[AuthorizationConfig, Dict[str, Any], None]) – (experimental) Optional authorization configuration. Default: - API Key authorization

  • domain_name (Union[DomainOptions, Dict[str, Any], None]) – (experimental) 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

  • log_config (Union[LogConfig, Dict[str, Any], None]) – (experimental) Logging configuration for this api. Default: - None

  • schema (Optional[Schema]) – (experimental) GraphQL schema definition. Specify how you want to define your schema. Schema.fromFile(filePath: string) allows schema definition through schema.graphql file Default: - schema will be generated code-first (i.e. addType, addObjectType, etc.)

  • xray_enabled (Optional[bool]) – (experimental) A flag indicating whether or not X-Ray tracing is enabled for the GraphQL API. Default: - false

Stability:

experimental

ExampleMetadata:

infused

Example:

api = appsync.GraphqlApi(self, "Api",
    name="demo"
)
demo = appsync.ObjectType("Demo",
    definition={
        "id": appsync.GraphqlType.string(is_required=True),
        "version": appsync.GraphqlType.string(is_required=True)
    }
)

api.add_type(demo)

Attributes

authorization_config

(experimental) Optional authorization configuration.

Default:
  • API Key authorization

Stability:

experimental

domain_name

(experimental) 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

Stability:

experimental

log_config

(experimental) Logging configuration for this api.

Default:
  • None

Stability:

experimental

name

(experimental) the name of the GraphQL API.

Stability:

experimental

schema

(experimental) GraphQL schema definition. Specify how you want to define your schema.

Schema.fromFile(filePath: string) allows schema definition through schema.graphql file

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

Stability:

experimental

xray_enabled

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

Default:
  • false

Stability:

experimental