ObjectTypeOptions

class aws_cdk.aws_appsync.ObjectTypeOptions(*, definition, directives=None, interface_types=None)

Bases: aws_cdk.aws_appsync.IntermediateTypeOptions

(experimental) Properties for configuring an Object Type.

Parameters
  • definition (Mapping[str, IField]) – (experimental) the attributes of this type.

  • directives (Optional[Sequence[Directive]]) – (experimental) the directives for this object type. Default: - no directives

  • interface_types (Optional[Sequence[InterfaceType]]) – (experimental) The Interface Types this Object Type implements. Default: - no interface types

Stability

experimental

ExampleMetadata

infused

Example:

# api: appsync.GraphqlApi
# dummy_request: appsync.MappingTemplate
# dummy_response: appsync.MappingTemplate

info = appsync.ObjectType("Info",
    definition={
        "node": appsync.ResolvableField(
            return_type=appsync.GraphqlType.string(),
            args={
                "id": appsync.GraphqlType.string()
            },
            data_source=api.add_none_data_source("none"),
            request_mapping_template=dummy_request,
            response_mapping_template=dummy_response
        )
    }
)

Attributes

definition

(experimental) the attributes of this type.

Stability

experimental

Return type

Mapping[str, IField]

directives

(experimental) the directives for this object type.

Default
  • no directives

Stability

experimental

Return type

Optional[List[Directive]]

interface_types

(experimental) The Interface Types this Object Type implements.

Default
  • no interface types

Stability

experimental

Return type

Optional[List[InterfaceType]]