Skip to content

Latest commit

 

History

History
3913 lines (2321 loc) · 139 KB

API.md

File metadata and controls

3913 lines (2321 loc) · 139 KB

API Reference

Constructs

SourceApiAssociationMergeOperation

The SourceApiAssociationMergeOperation triggers a merge of a source API during a Cloudformation stack update.

This can be used to propagate changes from the source API to the Merged API when the association is using type MANUAL_MERGE. If the merge operation fails, it will fail the Cloudformation update and rollback the stack.

Initializers

import { SourceApiAssociationMergeOperation } from 'awscdk-appsync-utils'

new SourceApiAssociationMergeOperation(scope: Construct, id: string, props: SourceApiAssociationMergeOperationProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props SourceApiAssociationMergeOperationProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { SourceApiAssociationMergeOperation } from 'awscdk-appsync-utils'

SourceApiAssociationMergeOperation.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


SourceApiAssociationMergeOperationProvider

SourceApiAssociationMergeProvider class is responsible for constructing the custom resource that will be used for initiating the source API merge during a Cloudformation update.

Initializers

import { SourceApiAssociationMergeOperationProvider } from 'awscdk-appsync-utils'

new SourceApiAssociationMergeOperationProvider(scope: Construct, id: string, props: SourceApiAssociationMergeOperationProviderProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props SourceApiAssociationMergeOperationProviderProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.
associateSourceApiAssociation This function associates a source api association with the provider.

toString
public toString(): string

Returns a string representation of this construct.

associateSourceApiAssociation
public associateSourceApiAssociation(sourceApiAssociation: ISourceApiAssociation): void

This function associates a source api association with the provider.

This method can be used for adding permissions to merge a specific source api association to the custom resource provider.

sourceApiAssociationRequired
  • Type: aws-cdk-lib.aws_appsync.ISourceApiAssociation

Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { SourceApiAssociationMergeOperationProvider } from 'awscdk-appsync-utils'

SourceApiAssociationMergeOperationProvider.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
schemaMergeLambda aws-cdk-lib.aws_lambda.SingletonFunction The lambda function responsible for kicking off the merge operation.
serviceToken string Service token for the resource provider.
sourceApiStablizationLambda aws-cdk-lib.aws_lambda.SingletonFunction The lambda function response for ensuring that the merge operation finished.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


schemaMergeLambdaRequired
public readonly schemaMergeLambda: SingletonFunction;
  • Type: aws-cdk-lib.aws_lambda.SingletonFunction

The lambda function responsible for kicking off the merge operation.


serviceTokenRequired
public readonly serviceToken: string;
  • Type: string

Service token for the resource provider.


sourceApiStablizationLambdaRequired
public readonly sourceApiStablizationLambda: SingletonFunction;
  • Type: aws-cdk-lib.aws_lambda.SingletonFunction

The lambda function response for ensuring that the merge operation finished.


Structs

AddFieldOptions

The options to add a field to an Intermediate Type.

Initializer

import { AddFieldOptions } from 'awscdk-appsync-utils'

const addFieldOptions: AddFieldOptions = { ... }

Properties

Name Type Description
field IField The resolvable field to add.
fieldName string The name of the field.

fieldOptional
public readonly field: IField;
  • Type: IField
  • Default: no IField

The resolvable field to add.

This option must be configured for Object, Interface, Input and Union Types.


fieldNameOptional
public readonly fieldName: string;
  • Type: string
  • Default: no fieldName

The name of the field.

This option must be configured for Object, Interface, Input and Enum Types.


BaseTypeOptions

Base options for GraphQL Types.

Initializer

import { BaseTypeOptions } from 'awscdk-appsync-utils'

const baseTypeOptions: BaseTypeOptions = { ... }

Properties

Name Type Description
isList boolean property determining if this attribute is a list i.e. if true, attribute would be [Type].
isRequired boolean property determining if this attribute is non-nullable i.e. if true, attribute would be Type!
isRequiredList boolean property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]!

isListOptional
public readonly isList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a list i.e. if true, attribute would be [Type].


isRequiredOptional
public readonly isRequired: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is non-nullable i.e. if true, attribute would be Type!


isRequiredListOptional
public readonly isRequiredList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]!


EnumTypeOptions

Properties for configuring an Enum Type.

Initializer

import { EnumTypeOptions } from 'awscdk-appsync-utils'

const enumTypeOptions: EnumTypeOptions = { ... }

Properties

Name Type Description
definition string[] the attributes of this type.

definitionRequired
public readonly definition: string[];
  • Type: string[]

the attributes of this type.


FieldOptions

Properties for configuring a field.

Initializer

import { FieldOptions } from 'awscdk-appsync-utils'

const fieldOptions: FieldOptions = { ... }

Properties

Name Type Description
returnType GraphqlType The return type for this field.
args {[ key: string ]: GraphqlType} The arguments for this field.
directives Directive[] the directives for this field.

returnTypeRequired
public readonly returnType: GraphqlType;

The return type for this field.


argsOptional
public readonly args: {[ key: string ]: GraphqlType};
  • Type: {[ key: string ]: GraphqlType}
  • Default: no arguments

The arguments for this field.

i.e. type Example (first: String second: String) {}

  • where 'first' and 'second' are key values for args and 'String' is the GraphqlType

directivesOptional
public readonly directives: Directive[];

the directives for this field.


GraphqlTypeOptions

Options for GraphQL Types.

Initializer

import { GraphqlTypeOptions } from 'awscdk-appsync-utils'

const graphqlTypeOptions: GraphqlTypeOptions = { ... }

Properties

Name Type Description
isList boolean property determining if this attribute is a list i.e. if true, attribute would be [Type].
isRequired boolean property determining if this attribute is non-nullable i.e. if true, attribute would be Type!
isRequiredList boolean property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]!
intermediateType IIntermediateType the intermediate type linked to this attribute.

isListOptional
public readonly isList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a list i.e. if true, attribute would be [Type].


isRequiredOptional
public readonly isRequired: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is non-nullable i.e. if true, attribute would be Type!


isRequiredListOptional
public readonly isRequiredList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]!


intermediateTypeOptional
public readonly intermediateType: IIntermediateType;

the intermediate type linked to this attribute.


IntermediateTypeOptions

Properties for configuring an Intermediate Type.

Initializer

import { IntermediateTypeOptions } from 'awscdk-appsync-utils'

const intermediateTypeOptions: IntermediateTypeOptions = { ... }

Properties

Name Type Description
definition {[ key: string ]: IField} the attributes of this type.
directives Directive[] the directives for this object type.

definitionRequired
public readonly definition: {[ key: string ]: IField};
  • Type: {[ key: string ]: IField}

the attributes of this type.


directivesOptional
public readonly directives: Directive[];

the directives for this object type.


ObjectTypeOptions

Properties for configuring an Object Type.

Initializer

import { ObjectTypeOptions } from 'awscdk-appsync-utils'

const objectTypeOptions: ObjectTypeOptions = { ... }

Properties

Name Type Description
definition {[ key: string ]: IField} the attributes of this type.
directives Directive[] the directives for this object type.
interfaceTypes InterfaceType[] The Interface Types this Object Type implements.

definitionRequired
public readonly definition: {[ key: string ]: IField};
  • Type: {[ key: string ]: IField}

the attributes of this type.


directivesOptional
public readonly directives: Directive[];

the directives for this object type.


interfaceTypesOptional
public readonly interfaceTypes: InterfaceType[];

The Interface Types this Object Type implements.


ResolvableFieldOptions

Properties for configuring a resolvable field.

Initializer

import { ResolvableFieldOptions } from 'awscdk-appsync-utils'

const resolvableFieldOptions: ResolvableFieldOptions = { ... }

Properties

Name Type Description
returnType GraphqlType The return type for this field.
args {[ key: string ]: GraphqlType} The arguments for this field.
directives Directive[] the directives for this field.
cachingConfig aws-cdk-lib.aws_appsync.CachingConfig The caching configuration for this resolver.
code aws-cdk-lib.aws_appsync.Code The function code.
dataSource aws-cdk-lib.aws_appsync.BaseDataSource The data source creating linked to this resolvable field.
maxBatchSize number The maximum number of elements per batch, when using batch invoke.
pipelineConfig aws-cdk-lib.aws_appsync.IAppsyncFunction[] configuration of the pipeline resolver.
requestMappingTemplate aws-cdk-lib.aws_appsync.MappingTemplate The request mapping template for this resolver.
responseMappingTemplate aws-cdk-lib.aws_appsync.MappingTemplate The response mapping template for this resolver.
runtime aws-cdk-lib.aws_appsync.FunctionRuntime The functions runtime.

returnTypeRequired
public readonly returnType: GraphqlType;

The return type for this field.


argsOptional
public readonly args: {[ key: string ]: GraphqlType};
  • Type: {[ key: string ]: GraphqlType}
  • Default: no arguments

The arguments for this field.

i.e. type Example (first: String second: String) {}

  • where 'first' and 'second' are key values for args and 'String' is the GraphqlType

directivesOptional
public readonly directives: Directive[];

the directives for this field.


cachingConfigOptional
public readonly cachingConfig: CachingConfig;
  • Type: aws-cdk-lib.aws_appsync.CachingConfig
  • Default: No caching configuration

The caching configuration for this resolver.


codeOptional
public readonly code: Code;
  • Type: aws-cdk-lib.aws_appsync.Code
  • Default: no code is used

The function code.


dataSourceOptional
public readonly dataSource: BaseDataSource;
  • Type: aws-cdk-lib.aws_appsync.BaseDataSource
  • Default: no data source

The data source creating linked to this resolvable field.


maxBatchSizeOptional
public readonly maxBatchSize: number;
  • Type: number
  • Default: No max batch size

The maximum number of elements per batch, when using batch invoke.


pipelineConfigOptional
public readonly pipelineConfig: IAppsyncFunction[];
  • Type: aws-cdk-lib.aws_appsync.IAppsyncFunction[]
  • Default: no pipeline resolver configuration An empty array | undefined sets resolver to be of kind, unit

configuration of the pipeline resolver.


requestMappingTemplateOptional
public readonly requestMappingTemplate: MappingTemplate;
  • Type: aws-cdk-lib.aws_appsync.MappingTemplate
  • Default: No mapping template

The request mapping template for this resolver.


responseMappingTemplateOptional
public readonly responseMappingTemplate: MappingTemplate;
  • Type: aws-cdk-lib.aws_appsync.MappingTemplate
  • Default: No mapping template

The response mapping template for this resolver.


runtimeOptional
public readonly runtime: FunctionRuntime;
  • Type: aws-cdk-lib.aws_appsync.FunctionRuntime
  • Default: no function runtime, VTL mapping templates used

The functions runtime.


SourceApiAssociationMergeOperationProps

Properties for SourceApiAssociationMergeOperation which handles triggering a merge operation as a custom resource during a Cloudformation stack update.

Initializer

import { SourceApiAssociationMergeOperationProps } from 'awscdk-appsync-utils'

const sourceApiAssociationMergeOperationProps: SourceApiAssociationMergeOperationProps = { ... }

Properties

Name Type Description
sourceApiAssociation aws-cdk-lib.aws_appsync.ISourceApiAssociation The source api association resource which will be merged.
alwaysMergeOnStackUpdate boolean Flag indicating whether the source api should be merged on every CFN update or not.
mergeOperationProvider ISourceApiAssociationMergeOperationProvider The merge operation provider construct which is responsible for configuring the Lambda resource that will be invoked during Cloudformation update.
versionIdentifier string The version identifier for the schema merge operation.

sourceApiAssociationRequired
public readonly sourceApiAssociation: ISourceApiAssociation;
  • Type: aws-cdk-lib.aws_appsync.ISourceApiAssociation

The source api association resource which will be merged.


alwaysMergeOnStackUpdateOptional
public readonly alwaysMergeOnStackUpdate: boolean;
  • Type: boolean
  • Default: False

Flag indicating whether the source api should be merged on every CFN update or not.

If set to true and there are no changes to the source API, this will result in a no-op merge operation.


mergeOperationProviderOptional
public readonly mergeOperationProvider: ISourceApiAssociationMergeOperationProvider;

The merge operation provider construct which is responsible for configuring the Lambda resource that will be invoked during Cloudformation update.


versionIdentifierOptional
public readonly versionIdentifier: string;
  • Type: string
  • Default: null

The version identifier for the schema merge operation.

Any change to the version identifier will trigger a merge on the next update. Use the version identifier property to control when the source API metadata is merged.


SourceApiAssociationMergeOperationProviderProps

Properties for SourceApiAssociationMergeOperationProvider.

Initializer

import { SourceApiAssociationMergeOperationProviderProps } from 'awscdk-appsync-utils'

const sourceApiAssociationMergeOperationProviderProps: SourceApiAssociationMergeOperationProviderProps = { ... }

Properties

Name Type Description
pollingInterval aws-cdk-lib.Duration Time between calls to the polling Lambda function which determines whether the merge operation is finished or not.
totalTimeout aws-cdk-lib.Duration Total timeout in waiting for the source api association merge operation to complete.

pollingIntervalOptional
public readonly pollingInterval: Duration;
  • Type: aws-cdk-lib.Duration
  • Default: Duration.seconds(5)

Time between calls to the polling Lambda function which determines whether the merge operation is finished or not.


totalTimeoutOptional
public readonly totalTimeout: Duration;
  • Type: aws-cdk-lib.Duration
  • Default: Duration.minutes(15)

Total timeout in waiting for the source api association merge operation to complete.


UnionTypeOptions

Properties for configuring an Union Type.

Initializer

import { UnionTypeOptions } from 'awscdk-appsync-utils'

const unionTypeOptions: UnionTypeOptions = { ... }

Properties

Name Type Description
definition IIntermediateType[] the object types for this union type.

definitionRequired
public readonly definition: IIntermediateType[];

the object types for this union type.


Classes

CodeFirstSchema

  • Implements: aws-cdk-lib.aws_appsync.ISchema

Initializers

import { CodeFirstSchema } from 'awscdk-appsync-utils'

new CodeFirstSchema()
Name Type Description

Methods

Name Description
addMutation Add a mutation field to the schema's Mutation. CDK will create an Object Type called 'Mutation'. For example,.
addQuery Add a query field to the schema's Query. CDK will create an Object Type called 'Query'. For example,.
addSubscription Add a subscription field to the schema's Subscription. CDK will create an Object Type called 'Subscription'. For example,.
addToSchema Escape hatch to add to Schema as desired.
addType Add type to the schema.
bind Called when the GraphQL Api is initialized to allow this object to bind to the stack.

addMutation
public addMutation(fieldName: string, field: ResolvableField): ObjectType

Add a mutation field to the schema's Mutation. CDK will create an Object Type called 'Mutation'. For example,.

type Mutation { fieldName: Field.returnType }

fieldNameRequired
  • Type: string

the name of the Mutation.


fieldRequired

the resolvable field to for this Mutation.


addQuery
public addQuery(fieldName: string, field: ResolvableField): ObjectType

Add a query field to the schema's Query. CDK will create an Object Type called 'Query'. For example,.

type Query { fieldName: Field.returnType }

fieldNameRequired
  • Type: string

the name of the query.


fieldRequired

the resolvable field to for this query.


addSubscription
public addSubscription(fieldName: string, field: Field): ObjectType

Add a subscription field to the schema's Subscription. CDK will create an Object Type called 'Subscription'. For example,.

type Subscription { fieldName: Field.returnType }

fieldNameRequired
  • Type: string

the name of the Subscription.


fieldRequired

the resolvable field to for this Subscription.


addToSchema
public addToSchema(addition: string, delimiter?: string): void

Escape hatch to add to Schema as desired.

Will always result in a newline.

additionRequired
  • Type: string

the addition to add to schema.


delimiterOptional
  • Type: string

the delimiter between schema and addition.


addType
public addType(type: IIntermediateType): IIntermediateType

Add type to the schema.

typeRequired

the intermediate type to add to the schema.


bind
public bind(api: IGraphqlApi, _options?: SchemaBindOptions): ISchemaConfig

Called when the GraphQL Api is initialized to allow this object to bind to the stack.

apiRequired
  • Type: aws-cdk-lib.aws_appsync.IGraphqlApi

The binding GraphQL Api.


_optionsOptional
  • Type: aws-cdk-lib.aws_appsync.SchemaBindOptions

Properties

Name Type Description
definition string The definition for this schema.

definitionRequired
public readonly definition: string;
  • Type: string

The definition for this schema.


Directive

Directives for types.

i.e.

Methods

Name Description
toString Generate the directive statement.

toString
public toString(): string

Generate the directive statement.

Static Functions

Name Description
apiKey Add the.
cognito Add the.
custom Add a custom directive.
iam Add the.
oidc Add the.
subscribe Add the.

apiKey
import { Directive } from 'awscdk-appsync-utils'

Directive.apiKey()

Add the.

cognito
import { Directive } from 'awscdk-appsync-utils'

Directive.cognito(groups: ...string[])

Add the.

groupsRequired
  • Type: ...string[]

the groups to allow access to.


custom
import { Directive } from 'awscdk-appsync-utils'

Directive.custom(statement: string)

Add a custom directive.

statementRequired
  • Type: string

the directive statement to append.


iam
import { Directive } from 'awscdk-appsync-utils'

Directive.iam()

Add the.

oidc
import { Directive } from 'awscdk-appsync-utils'

Directive.oidc()

Add the.

subscribe
import { Directive } from 'awscdk-appsync-utils'

Directive.subscribe(mutations: ...string[])

Add the.

mutationsRequired
  • Type: ...string[]

the mutation fields to link to.


Properties

Name Type Description
mode aws-cdk-lib.aws_appsync.AuthorizationType The authorization type of this directive.
mutationFields string[] Mutation fields for a subscription directive.

modeOptional
public readonly mode: AuthorizationType;
  • Type: aws-cdk-lib.aws_appsync.AuthorizationType
  • Default: not an authorization directive

The authorization type of this directive.


mutationFieldsOptional
public readonly mutationFields: string[];
  • Type: string[]
  • Default: not a subscription directive

Mutation fields for a subscription directive.


EnumType

Enum Types are abstract types that includes a set of fields that represent the strings this type can create.

Initializers

import { EnumType } from 'awscdk-appsync-utils'

new EnumType(name: string, options: EnumTypeOptions)
Name Type Description
name string the name of this type.
options EnumTypeOptions No description.

nameRequired
  • Type: string

the name of this type.


optionsRequired

Methods

Name Description
addField Add a field to this Enum Type.
attribute Create an GraphQL Type representing this Enum Type.
toString Generate the string of this enum type.

addField
public addField(options: AddFieldOptions): void

Add a field to this Enum Type.

To add a field to this Enum Type, you must only configure addField with the fieldName options.

optionsRequired

the options to add a field.


attribute
public attribute(options?: BaseTypeOptions): GraphqlType

Create an GraphQL Type representing this Enum Type.

optionsOptional

toString
public toString(): string

Generate the string of this enum type.

Properties

Name Type Description
definition {[ key: string ]: IField} the attributes of this type.
name string the name of this type.

definitionRequired
public readonly definition: {[ key: string ]: IField};
  • Type: {[ key: string ]: IField}

the attributes of this type.


nameRequired
public readonly name: string;
  • Type: string

the name of this type.


Field

Fields build upon Graphql Types and provide typing and arguments.

Initializers

import { Field } from 'awscdk-appsync-utils'

new Field(options: FieldOptions)
Name Type Description
options FieldOptions No description.

optionsRequired

Methods

Name Description
argsToString Generate the args string of this resolvable field.
directivesToString Generate the directives for this field.
toString Generate the string for this attribute.

argsToString
public argsToString(): string

Generate the args string of this resolvable field.

directivesToString
public directivesToString(modes?: AuthorizationType[]): string

Generate the directives for this field.

modesOptional
  • Type: aws-cdk-lib.aws_appsync.AuthorizationType[]

toString
public toString(): string

Generate the string for this attribute.

Static Functions

Name Description
awsDate AWSDate scalar type represents a valid extended ISO 8601 Date string.
awsDateTime AWSDateTime scalar type represents a valid extended ISO 8601 DateTime string.
awsEmail AWSEmail scalar type represents an email address string (i.e.username@example.com).
awsIpAddress AWSIPAddress scalar type respresents a valid IPv4 of IPv6 address string.
awsJson AWSJson scalar type represents a JSON string.
awsPhone AWSPhone scalar type represents a valid phone number. Phone numbers maybe be whitespace delimited or hyphenated.
awsTime AWSTime scalar type represents a valid extended ISO 8601 Time string.
awsTimestamp AWSTimestamp scalar type represents the number of seconds since 1970-01-01T00:00Z.
awsUrl AWSURL scalar type represetns a valid URL string.
boolean Boolean scalar type is a boolean value: true or false.
float Float scalar type is a signed double-precision fractional value.
id ID scalar type is a unique identifier. ID type is serialized similar to String.
int Int scalar type is a signed non-fractional numerical value.
intermediate an intermediate type to be added as an attribute (i.e. an interface or an object type).
string String scalar type is a free-form human-readable text.

awsDate
import { Field } from 'awscdk-appsync-utils'

Field.awsDate(options?: BaseTypeOptions)

AWSDate scalar type represents a valid extended ISO 8601 Date string.

In other words, accepts date strings in the form of YYYY-MM-DD. It accepts time zone offsets.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsDateTime
import { Field } from 'awscdk-appsync-utils'

Field.awsDateTime(options?: BaseTypeOptions)

AWSDateTime scalar type represents a valid extended ISO 8601 DateTime string.

In other words, accepts date strings in the form of YYYY-MM-DDThh:mm:ss.sssZ. It accepts time zone offsets.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsEmail
import { Field } from 'awscdk-appsync-utils'

Field.awsEmail(options?: BaseTypeOptions)

AWSEmail scalar type represents an email address string (i.e.username@example.com).

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsIpAddress
import { Field } from 'awscdk-appsync-utils'

Field.awsIpAddress(options?: BaseTypeOptions)

AWSIPAddress scalar type respresents a valid IPv4 of IPv6 address string.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsJson
import { Field } from 'awscdk-appsync-utils'

Field.awsJson(options?: BaseTypeOptions)

AWSJson scalar type represents a JSON string.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsPhone
import { Field } from 'awscdk-appsync-utils'

Field.awsPhone(options?: BaseTypeOptions)

AWSPhone scalar type represents a valid phone number. Phone numbers maybe be whitespace delimited or hyphenated.

The number can specify a country code at the beginning, but is not required for US phone numbers.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsTime
import { Field } from 'awscdk-appsync-utils'

Field.awsTime(options?: BaseTypeOptions)

AWSTime scalar type represents a valid extended ISO 8601 Time string.

In other words, accepts date strings in the form of hh:mm:ss.sss. It accepts time zone offsets.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsTimestamp
import { Field } from 'awscdk-appsync-utils'

Field.awsTimestamp(options?: BaseTypeOptions)

AWSTimestamp scalar type represents the number of seconds since 1970-01-01T00:00Z.

Timestamps are serialized and deserialized as numbers.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsUrl
import { Field } from 'awscdk-appsync-utils'

Field.awsUrl(options?: BaseTypeOptions)

AWSURL scalar type represetns a valid URL string.

URLs wihtout schemes or contain double slashes are considered invalid.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


boolean
import { Field } from 'awscdk-appsync-utils'

Field.boolean(options?: BaseTypeOptions)

Boolean scalar type is a boolean value: true or false.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


float
import { Field } from 'awscdk-appsync-utils'

Field.float(options?: BaseTypeOptions)

Float scalar type is a signed double-precision fractional value.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


id
import { Field } from 'awscdk-appsync-utils'

Field.id(options?: BaseTypeOptions)

ID scalar type is a unique identifier. ID type is serialized similar to String.

Often used as a key for a cache and not intended to be human-readable.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


int
import { Field } from 'awscdk-appsync-utils'

Field.int(options?: BaseTypeOptions)

Int scalar type is a signed non-fractional numerical value.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


intermediate
import { Field } from 'awscdk-appsync-utils'

Field.intermediate(options?: GraphqlTypeOptions)

an intermediate type to be added as an attribute (i.e. an interface or an object type).

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList - intermediateType.


string
import { Field } from 'awscdk-appsync-utils'

Field.string(options?: BaseTypeOptions)

String scalar type is a free-form human-readable text.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


Properties

Name Type Description
isList boolean property determining if this attribute is a list i.e. if true, attribute would be [Type].
isRequired boolean property determining if this attribute is non-nullable i.e. if true, attribute would be Type! and this attribute must always have a value.
isRequiredList boolean property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! and this attribute's list must always have a value.
type Type the type of attribute.
intermediateType IIntermediateType the intermediate type linked to this attribute (i.e. an interface or an object).
fieldOptions ResolvableFieldOptions The options for this field.

isListRequired
public readonly isList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a list i.e. if true, attribute would be [Type].


isRequiredRequired
public readonly isRequired: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is non-nullable i.e. if true, attribute would be Type! and this attribute must always have a value.


isRequiredListRequired
public readonly isRequiredList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! and this attribute's list must always have a value.


typeRequired
public readonly type: Type;

the type of attribute.


intermediateTypeOptional
public readonly intermediateType: IIntermediateType;

the intermediate type linked to this attribute (i.e. an interface or an object).


fieldOptionsOptional
public readonly fieldOptions: ResolvableFieldOptions;

The options for this field.


GraphqlType

The GraphQL Types in AppSync's GraphQL.

GraphQL Types are the building blocks for object types, queries, mutations, etc. They are types like String, Int, Id or even Object Types you create.

i.e. String, String!, [String], [String!], [String]!

GraphQL Types are used to define the entirety of schema.

Initializers

import { GraphqlType } from 'awscdk-appsync-utils'

new GraphqlType(type: Type, options?: GraphqlTypeOptions)
Name Type Description
type Type the type of attribute.
options GraphqlTypeOptions No description.

typeRequired

the type of attribute.


optionsOptional

Methods

Name Description
argsToString Generate the arguments for this field.
directivesToString Generate the directives for this field.
toString Generate the string for this attribute.

argsToString
public argsToString(): string

Generate the arguments for this field.

directivesToString
public directivesToString(_modes?: AuthorizationType[]): string

Generate the directives for this field.

_modesOptional
  • Type: aws-cdk-lib.aws_appsync.AuthorizationType[]

toString
public toString(): string

Generate the string for this attribute.

Static Functions

Name Description
awsDate AWSDate scalar type represents a valid extended ISO 8601 Date string.
awsDateTime AWSDateTime scalar type represents a valid extended ISO 8601 DateTime string.
awsEmail AWSEmail scalar type represents an email address string (i.e.username@example.com).
awsIpAddress AWSIPAddress scalar type respresents a valid IPv4 of IPv6 address string.
awsJson AWSJson scalar type represents a JSON string.
awsPhone AWSPhone scalar type represents a valid phone number. Phone numbers maybe be whitespace delimited or hyphenated.
awsTime AWSTime scalar type represents a valid extended ISO 8601 Time string.
awsTimestamp AWSTimestamp scalar type represents the number of seconds since 1970-01-01T00:00Z.
awsUrl AWSURL scalar type represetns a valid URL string.
boolean Boolean scalar type is a boolean value: true or false.
float Float scalar type is a signed double-precision fractional value.
id ID scalar type is a unique identifier. ID type is serialized similar to String.
int Int scalar type is a signed non-fractional numerical value.
intermediate an intermediate type to be added as an attribute (i.e. an interface or an object type).
string String scalar type is a free-form human-readable text.

awsDate
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.awsDate(options?: BaseTypeOptions)

AWSDate scalar type represents a valid extended ISO 8601 Date string.

In other words, accepts date strings in the form of YYYY-MM-DD. It accepts time zone offsets.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsDateTime
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.awsDateTime(options?: BaseTypeOptions)

AWSDateTime scalar type represents a valid extended ISO 8601 DateTime string.

In other words, accepts date strings in the form of YYYY-MM-DDThh:mm:ss.sssZ. It accepts time zone offsets.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsEmail
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.awsEmail(options?: BaseTypeOptions)

AWSEmail scalar type represents an email address string (i.e.username@example.com).

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsIpAddress
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.awsIpAddress(options?: BaseTypeOptions)

AWSIPAddress scalar type respresents a valid IPv4 of IPv6 address string.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsJson
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.awsJson(options?: BaseTypeOptions)

AWSJson scalar type represents a JSON string.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsPhone
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.awsPhone(options?: BaseTypeOptions)

AWSPhone scalar type represents a valid phone number. Phone numbers maybe be whitespace delimited or hyphenated.

The number can specify a country code at the beginning, but is not required for US phone numbers.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsTime
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.awsTime(options?: BaseTypeOptions)

AWSTime scalar type represents a valid extended ISO 8601 Time string.

In other words, accepts date strings in the form of hh:mm:ss.sss. It accepts time zone offsets.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsTimestamp
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.awsTimestamp(options?: BaseTypeOptions)

AWSTimestamp scalar type represents the number of seconds since 1970-01-01T00:00Z.

Timestamps are serialized and deserialized as numbers.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsUrl
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.awsUrl(options?: BaseTypeOptions)

AWSURL scalar type represetns a valid URL string.

URLs wihtout schemes or contain double slashes are considered invalid.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


boolean
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.boolean(options?: BaseTypeOptions)

Boolean scalar type is a boolean value: true or false.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


float
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.float(options?: BaseTypeOptions)

Float scalar type is a signed double-precision fractional value.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


id
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.id(options?: BaseTypeOptions)

ID scalar type is a unique identifier. ID type is serialized similar to String.

Often used as a key for a cache and not intended to be human-readable.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


int
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.int(options?: BaseTypeOptions)

Int scalar type is a signed non-fractional numerical value.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


intermediate
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.intermediate(options?: GraphqlTypeOptions)

an intermediate type to be added as an attribute (i.e. an interface or an object type).

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList - intermediateType.


string
import { GraphqlType } from 'awscdk-appsync-utils'

GraphqlType.string(options?: BaseTypeOptions)

String scalar type is a free-form human-readable text.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


Properties

Name Type Description
isList boolean property determining if this attribute is a list i.e. if true, attribute would be [Type].
isRequired boolean property determining if this attribute is non-nullable i.e. if true, attribute would be Type! and this attribute must always have a value.
isRequiredList boolean property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! and this attribute's list must always have a value.
type Type the type of attribute.
intermediateType IIntermediateType the intermediate type linked to this attribute (i.e. an interface or an object).

isListRequired
public readonly isList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a list i.e. if true, attribute would be [Type].


isRequiredRequired
public readonly isRequired: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is non-nullable i.e. if true, attribute would be Type! and this attribute must always have a value.


isRequiredListRequired
public readonly isRequiredList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! and this attribute's list must always have a value.


typeRequired
public readonly type: Type;

the type of attribute.


intermediateTypeOptional
public readonly intermediateType: IIntermediateType;

the intermediate type linked to this attribute (i.e. an interface or an object).


InputType

Input Types are abstract types that define complex objects.

They are used in arguments to represent

Initializers

import { InputType } from 'awscdk-appsync-utils'

new InputType(name: string, props: IntermediateTypeOptions)
Name Type Description
name string the name of this type.
props IntermediateTypeOptions No description.

nameRequired
  • Type: string

the name of this type.


propsRequired

Methods

Name Description
addField Add a field to this Input Type.
attribute Create a GraphQL Type representing this Input Type.
toString Generate the string of this input type.

addField
public addField(options: AddFieldOptions): void

Add a field to this Input Type.

Input Types must have both fieldName and field options.

optionsRequired

the options to add a field.


attribute
public attribute(options?: BaseTypeOptions): GraphqlType

Create a GraphQL Type representing this Input Type.

optionsOptional

the options to configure this attribute.


toString
public toString(): string

Generate the string of this input type.

Properties

Name Type Description
definition {[ key: string ]: IField} the attributes of this type.
name string the name of this type.

definitionRequired
public readonly definition: {[ key: string ]: IField};
  • Type: {[ key: string ]: IField}

the attributes of this type.


nameRequired
public readonly name: string;
  • Type: string

the name of this type.


InterfaceType

Interface Types are abstract types that includes a certain set of fields that other types must include if they implement the interface.

Initializers

import { InterfaceType } from 'awscdk-appsync-utils'

new InterfaceType(name: string, props: IntermediateTypeOptions)
Name Type Description
name string the name of this type.
props IntermediateTypeOptions No description.

nameRequired
  • Type: string

the name of this type.


propsRequired

Methods

Name Description
addField Add a field to this Interface Type.
attribute Create a GraphQL Type representing this Intermediate Type.
toString Generate the string of this object type.

addField
public addField(options: AddFieldOptions): void

Add a field to this Interface Type.

Interface Types must have both fieldName and field options.

optionsRequired

the options to add a field.


attribute
public attribute(options?: BaseTypeOptions): GraphqlType

Create a GraphQL Type representing this Intermediate Type.

optionsOptional

the options to configure this attribute.


toString
public toString(): string

Generate the string of this object type.

Properties

Name Type Description
definition {[ key: string ]: IField} the attributes of this type.
name string the name of this type.
directives Directive[] the directives for this object type.

definitionRequired
public readonly definition: {[ key: string ]: IField};
  • Type: {[ key: string ]: IField}

the attributes of this type.


nameRequired
public readonly name: string;
  • Type: string

the name of this type.


directivesOptional
public readonly directives: Directive[];

the directives for this object type.


ObjectType

Object Types are types declared by you.

Initializers

import { ObjectType } from 'awscdk-appsync-utils'

new ObjectType(name: string, props: ObjectTypeOptions)
Name Type Description
name string the name of this type.
props ObjectTypeOptions No description.

nameRequired
  • Type: string

the name of this type.


propsRequired

Methods

Name Description
addField Add a field to this Object Type.
attribute Create a GraphQL Type representing this Intermediate Type.
toString Generate the string of this object type.

addField
public addField(options: AddFieldOptions): void

Add a field to this Object Type.

Object Types must have both fieldName and field options.

optionsRequired

the options to add a field.


attribute
public attribute(options?: BaseTypeOptions): GraphqlType

Create a GraphQL Type representing this Intermediate Type.

optionsOptional

the options to configure this attribute.


toString
public toString(): string

Generate the string of this object type.

Properties

Name Type Description
definition {[ key: string ]: IField} the attributes of this type.
name string the name of this type.
directives Directive[] the directives for this object type.
interfaceTypes InterfaceType[] The Interface Types this Object Type implements.
resolvers aws-cdk-lib.aws_appsync.Resolver[] The resolvers linked to this data source.

definitionRequired
public readonly definition: {[ key: string ]: IField};
  • Type: {[ key: string ]: IField}

the attributes of this type.


nameRequired
public readonly name: string;
  • Type: string

the name of this type.


directivesOptional
public readonly directives: Directive[];

the directives for this object type.


interfaceTypesOptional
public readonly interfaceTypes: InterfaceType[];

The Interface Types this Object Type implements.


resolversOptional
public readonly resolvers: Resolver[];
  • Type: aws-cdk-lib.aws_appsync.Resolver[]

The resolvers linked to this data source.


ResolvableField

Resolvable Fields build upon Graphql Types and provide fields that can resolve into operations on a data source.

Initializers

import { ResolvableField } from 'awscdk-appsync-utils'

new ResolvableField(options: ResolvableFieldOptions)
Name Type Description
options ResolvableFieldOptions No description.

optionsRequired

Methods

Name Description
argsToString Generate the args string of this resolvable field.
directivesToString Generate the directives for this field.
toString Generate the string for this attribute.

argsToString
public argsToString(): string

Generate the args string of this resolvable field.

directivesToString
public directivesToString(modes?: AuthorizationType[]): string

Generate the directives for this field.

modesOptional
  • Type: aws-cdk-lib.aws_appsync.AuthorizationType[]

toString
public toString(): string

Generate the string for this attribute.

Static Functions

Name Description
awsDate AWSDate scalar type represents a valid extended ISO 8601 Date string.
awsDateTime AWSDateTime scalar type represents a valid extended ISO 8601 DateTime string.
awsEmail AWSEmail scalar type represents an email address string (i.e.username@example.com).
awsIpAddress AWSIPAddress scalar type respresents a valid IPv4 of IPv6 address string.
awsJson AWSJson scalar type represents a JSON string.
awsPhone AWSPhone scalar type represents a valid phone number. Phone numbers maybe be whitespace delimited or hyphenated.
awsTime AWSTime scalar type represents a valid extended ISO 8601 Time string.
awsTimestamp AWSTimestamp scalar type represents the number of seconds since 1970-01-01T00:00Z.
awsUrl AWSURL scalar type represetns a valid URL string.
boolean Boolean scalar type is a boolean value: true or false.
float Float scalar type is a signed double-precision fractional value.
id ID scalar type is a unique identifier. ID type is serialized similar to String.
int Int scalar type is a signed non-fractional numerical value.
intermediate an intermediate type to be added as an attribute (i.e. an interface or an object type).
string String scalar type is a free-form human-readable text.

awsDate
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.awsDate(options?: BaseTypeOptions)

AWSDate scalar type represents a valid extended ISO 8601 Date string.

In other words, accepts date strings in the form of YYYY-MM-DD. It accepts time zone offsets.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsDateTime
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.awsDateTime(options?: BaseTypeOptions)

AWSDateTime scalar type represents a valid extended ISO 8601 DateTime string.

In other words, accepts date strings in the form of YYYY-MM-DDThh:mm:ss.sssZ. It accepts time zone offsets.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsEmail
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.awsEmail(options?: BaseTypeOptions)

AWSEmail scalar type represents an email address string (i.e.username@example.com).

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsIpAddress
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.awsIpAddress(options?: BaseTypeOptions)

AWSIPAddress scalar type respresents a valid IPv4 of IPv6 address string.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsJson
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.awsJson(options?: BaseTypeOptions)

AWSJson scalar type represents a JSON string.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsPhone
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.awsPhone(options?: BaseTypeOptions)

AWSPhone scalar type represents a valid phone number. Phone numbers maybe be whitespace delimited or hyphenated.

The number can specify a country code at the beginning, but is not required for US phone numbers.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsTime
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.awsTime(options?: BaseTypeOptions)

AWSTime scalar type represents a valid extended ISO 8601 Time string.

In other words, accepts date strings in the form of hh:mm:ss.sss. It accepts time zone offsets.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsTimestamp
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.awsTimestamp(options?: BaseTypeOptions)

AWSTimestamp scalar type represents the number of seconds since 1970-01-01T00:00Z.

Timestamps are serialized and deserialized as numbers.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


awsUrl
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.awsUrl(options?: BaseTypeOptions)

AWSURL scalar type represetns a valid URL string.

URLs wihtout schemes or contain double slashes are considered invalid.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


boolean
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.boolean(options?: BaseTypeOptions)

Boolean scalar type is a boolean value: true or false.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


float
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.float(options?: BaseTypeOptions)

Float scalar type is a signed double-precision fractional value.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


id
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.id(options?: BaseTypeOptions)

ID scalar type is a unique identifier. ID type is serialized similar to String.

Often used as a key for a cache and not intended to be human-readable.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


int
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.int(options?: BaseTypeOptions)

Int scalar type is a signed non-fractional numerical value.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


intermediate
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.intermediate(options?: GraphqlTypeOptions)

an intermediate type to be added as an attribute (i.e. an interface or an object type).

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList - intermediateType.


string
import { ResolvableField } from 'awscdk-appsync-utils'

ResolvableField.string(options?: BaseTypeOptions)

String scalar type is a free-form human-readable text.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


Properties

Name Type Description
isList boolean property determining if this attribute is a list i.e. if true, attribute would be [Type].
isRequired boolean property determining if this attribute is non-nullable i.e. if true, attribute would be Type! and this attribute must always have a value.
isRequiredList boolean property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! and this attribute's list must always have a value.
type Type the type of attribute.
intermediateType IIntermediateType the intermediate type linked to this attribute (i.e. an interface or an object).
fieldOptions ResolvableFieldOptions The options to make this field resolvable.

isListRequired
public readonly isList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a list i.e. if true, attribute would be [Type].


isRequiredRequired
public readonly isRequired: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is non-nullable i.e. if true, attribute would be Type! and this attribute must always have a value.


isRequiredListRequired
public readonly isRequiredList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! and this attribute's list must always have a value.


typeRequired
public readonly type: Type;

the type of attribute.


intermediateTypeOptional
public readonly intermediateType: IIntermediateType;

the intermediate type linked to this attribute (i.e. an interface or an object).


fieldOptionsOptional
public readonly fieldOptions: ResolvableFieldOptions;

The options to make this field resolvable.


UnionType

Union Types are abstract types that are similar to Interface Types, but they cannot to specify any common fields between types.

Note that fields of a union type need to be object types. In other words, you can't create a union type out of interfaces, other unions, or inputs.

Initializers

import { UnionType } from 'awscdk-appsync-utils'

new UnionType(name: string, options: UnionTypeOptions)
Name Type Description
name string the name of this type.
options UnionTypeOptions No description.

nameRequired
  • Type: string

the name of this type.


optionsRequired

Methods

Name Description
addField Add a field to this Union Type.
attribute Create a GraphQL Type representing this Union Type.
toString Generate the string of this Union type.

addField
public addField(options: AddFieldOptions): void

Add a field to this Union Type.

Input Types must have field options and the IField must be an Object Type.

optionsRequired

the options to add a field.


attribute
public attribute(options?: BaseTypeOptions): GraphqlType

Create a GraphQL Type representing this Union Type.

optionsOptional

the options to configure this attribute.


toString
public toString(): string

Generate the string of this Union type.

Properties

Name Type Description
definition {[ key: string ]: IField} the attributes of this type.
name string the name of this type.

definitionRequired
public readonly definition: {[ key: string ]: IField};
  • Type: {[ key: string ]: IField}

the attributes of this type.


nameRequired
public readonly name: string;
  • Type: string

the name of this type.


Protocols

IField

A Graphql Field.

Methods

Name Description
argsToString Generate the arguments for this field.
directivesToString Generate the directives for this field.
toString Generate the string for this attribute.

argsToString
public argsToString(): string

Generate the arguments for this field.

directivesToString
public directivesToString(modes?: AuthorizationType[]): string

Generate the directives for this field.

modesOptional
  • Type: aws-cdk-lib.aws_appsync.AuthorizationType[]

the authorization modes of the graphql api.


toString
public toString(): string

Generate the string for this attribute.

Properties

Name Type Description
isList boolean property determining if this attribute is a list i.e. if true, attribute would be [Type].
isRequired boolean property determining if this attribute is non-nullable i.e. if true, attribute would be Type! and this attribute must always have a value.
isRequiredList boolean property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! and this attribute's list must always have a value.
type Type the type of attribute.
fieldOptions ResolvableFieldOptions The options to make this field resolvable.
intermediateType IIntermediateType the intermediate type linked to this attribute (i.e. an interface or an object).

isListRequired
public readonly isList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a list i.e. if true, attribute would be [Type].


isRequiredRequired
public readonly isRequired: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is non-nullable i.e. if true, attribute would be Type! and this attribute must always have a value.


isRequiredListRequired
public readonly isRequiredList: boolean;
  • Type: boolean
  • Default: false

property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! and this attribute's list must always have a value.


typeRequired
public readonly type: Type;

the type of attribute.


fieldOptionsOptional
public readonly fieldOptions: ResolvableFieldOptions;

The options to make this field resolvable.


intermediateTypeOptional
public readonly intermediateType: IIntermediateType;

the intermediate type linked to this attribute (i.e. an interface or an object).


IIntermediateType

Intermediate Types are types that includes a certain set of fields that define the entirety of your schema.

Methods

Name Description
addField Add a field to this Intermediate Type.
attribute Create an GraphQL Type representing this Intermediate Type.
toString Generate the string of this object type.

addField
public addField(options: AddFieldOptions): void

Add a field to this Intermediate Type.

optionsRequired

attribute
public attribute(options?: BaseTypeOptions): GraphqlType

Create an GraphQL Type representing this Intermediate Type.

optionsOptional

the options to configure this attribute - isList - isRequired - isRequiredList.


toString
public toString(): string

Generate the string of this object type.

Properties

Name Type Description
definition {[ key: string ]: IField} the attributes of this type.
name string the name of this type.
directives Directive[] the directives for this object type.
interfaceTypes InterfaceType[] The Interface Types this Intermediate Type implements.
intermediateType IIntermediateType the intermediate type linked to this attribute (i.e. an interface or an object).
resolvers aws-cdk-lib.aws_appsync.Resolver[] The resolvers linked to this data source.

definitionRequired
public readonly definition: {[ key: string ]: IField};
  • Type: {[ key: string ]: IField}

the attributes of this type.


nameRequired
public readonly name: string;
  • Type: string

the name of this type.


directivesOptional
public readonly directives: Directive[];

the directives for this object type.


interfaceTypesOptional
public readonly interfaceTypes: InterfaceType[];

The Interface Types this Intermediate Type implements.


intermediateTypeOptional
public readonly intermediateType: IIntermediateType;

the intermediate type linked to this attribute (i.e. an interface or an object).


resolversOptional
public readonly resolvers: Resolver[];
  • Type: aws-cdk-lib.aws_appsync.Resolver[]

The resolvers linked to this data source.


ISourceApiAssociationMergeOperationProvider

This interface for the provider of the custom resource that will be used to initiate a merge operation during Cloudformation update.

Methods

Name Description
associateSourceApiAssociation This function associates a source api association with the provider.

associateSourceApiAssociation
public associateSourceApiAssociation(sourceApiAssociation: ISourceApiAssociation): void

This function associates a source api association with the provider.

This method can be used for adding permissions to merge a specific source api association to the custom resource provider.

sourceApiAssociationRequired
  • Type: aws-cdk-lib.aws_appsync.ISourceApiAssociation

The association to associate.


Properties

Name Type Description
node constructs.Node The tree node.
serviceToken string Service token which is used for identifying the handler used for the merge operation custom resource.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


serviceTokenRequired
public readonly serviceToken: string;
  • Type: string

Service token which is used for identifying the handler used for the merge operation custom resource.


Enums

Type

Enum containing the Types that can be used to define ObjectTypes.

Members

Name Description
ID ID scalar type is a unique identifier. ID type is serialized similar to String.
STRING String scalar type is a free-form human-readable text.
INT Int scalar type is a signed non-fractional numerical value.
FLOAT Float scalar type is a signed double-precision fractional value.
BOOLEAN Boolean scalar type is a boolean value: true or false.
AWS_DATE AWSDate scalar type represents a valid extended ISO 8601 Date string.
AWS_TIME AWSTime scalar type represents a valid extended ISO 8601 Time string.
AWS_DATE_TIME AWSDateTime scalar type represents a valid extended ISO 8601 DateTime string.
AWS_TIMESTAMP AWSTimestamp scalar type represents the number of seconds since 1970-01-01T00:00Z.
AWS_EMAIL AWSEmail scalar type represents an email address string (i.e.username@example.com).
AWS_JSON AWSJson scalar type represents a JSON string.
AWS_URL AWSURL scalar type represetns a valid URL string.
AWS_PHONE AWSPhone scalar type represents a valid phone number. Phone numbers maybe be whitespace delimited or hyphenated.
AWS_IP_ADDRESS AWSIPAddress scalar type respresents a valid IPv4 of IPv6 address string.
INTERMEDIATE Type used for Intermediate Types (i.e. an interface or an object type).

ID

ID scalar type is a unique identifier. ID type is serialized similar to String.

Often used as a key for a cache and not intended to be human-readable.


STRING

String scalar type is a free-form human-readable text.


INT

Int scalar type is a signed non-fractional numerical value.


FLOAT

Float scalar type is a signed double-precision fractional value.


BOOLEAN

Boolean scalar type is a boolean value: true or false.


AWS_DATE

AWSDate scalar type represents a valid extended ISO 8601 Date string.

In other words, accepts date strings in the form of YYYY-MM-DD. It accepts time zone offsets.

https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates


AWS_TIME

AWSTime scalar type represents a valid extended ISO 8601 Time string.

In other words, accepts date strings in the form of hh:mm:ss.sss. It accepts time zone offsets.

https://en.wikipedia.org/wiki/ISO_8601#Times


AWS_DATE_TIME

AWSDateTime scalar type represents a valid extended ISO 8601 DateTime string.

In other words, accepts date strings in the form of YYYY-MM-DDThh:mm:ss.sssZ. It accepts time zone offsets.

https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations


AWS_TIMESTAMP

AWSTimestamp scalar type represents the number of seconds since 1970-01-01T00:00Z.

Timestamps are serialized and deserialized as numbers.


AWS_EMAIL

AWSEmail scalar type represents an email address string (i.e.username@example.com).


AWS_JSON

AWSJson scalar type represents a JSON string.


AWS_URL

AWSURL scalar type represetns a valid URL string.

URLs wihtout schemes or contain double slashes are considered invalid.


AWS_PHONE

AWSPhone scalar type represents a valid phone number. Phone numbers maybe be whitespace delimited or hyphenated.

The number can specify a country code at the beginning, but is not required for US phone numbers.


AWS_IP_ADDRESS

AWSIPAddress scalar type respresents a valid IPv4 of IPv6 address string.


INTERMEDIATE

Type used for Intermediate Types (i.e. an interface or an object type).