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.
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. |
- Type: constructs.Construct
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { SourceApiAssociationMergeOperation } from 'awscdk-appsync-utils'
SourceApiAssociationMergeOperation.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
- Implements: ISourceApiAssociationMergeOperationProvider
SourceApiAssociationMergeProvider class is responsible for constructing the custom resource that will be used for initiating the source API merge during a Cloudformation update.
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. |
- Type: constructs.Construct
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
associateSourceApiAssociation |
This function associates a source api association with the provider. |
public toString(): string
Returns a string representation of this construct.
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.
- Type: aws-cdk-lib.aws_appsync.ISourceApiAssociation
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { SourceApiAssociationMergeOperationProvider } from 'awscdk-appsync-utils'
SourceApiAssociationMergeOperationProvider.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
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. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly schemaMergeLambda: SingletonFunction;
- Type: aws-cdk-lib.aws_lambda.SingletonFunction
The lambda function responsible for kicking off the merge operation.
public readonly serviceToken: string;
- Type: string
Service token for the resource provider.
public readonly sourceApiStablizationLambda: SingletonFunction;
- Type: aws-cdk-lib.aws_lambda.SingletonFunction
The lambda function response for ensuring that the merge operation finished.
The options to add a field to an Intermediate Type.
import { AddFieldOptions } from 'awscdk-appsync-utils'
const addFieldOptions: AddFieldOptions = { ... }
Name | Type | Description |
---|---|---|
field |
IField |
The resolvable field to add. |
fieldName |
string |
The name of the field. |
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.
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.
Base options for GraphQL Types.
import { BaseTypeOptions } from 'awscdk-appsync-utils'
const baseTypeOptions: BaseTypeOptions = { ... }
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! ]! |
public readonly isList: boolean;
- Type: boolean
- Default: false
property determining if this attribute is a list i.e. if true, attribute would be [Type].
public readonly isRequired: boolean;
- Type: boolean
- Default: false
property determining if this attribute is non-nullable i.e. if true, attribute would be Type!
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! ]!
Properties for configuring an Enum Type.
import { EnumTypeOptions } from 'awscdk-appsync-utils'
const enumTypeOptions: EnumTypeOptions = { ... }
Name | Type | Description |
---|---|---|
definition |
string[] |
the attributes of this type. |
public readonly definition: string[];
- Type: string[]
the attributes of this type.
Properties for configuring a field.
import { FieldOptions } from 'awscdk-appsync-utils'
const fieldOptions: FieldOptions = { ... }
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. |
public readonly returnType: GraphqlType;
- Type: GraphqlType
The return type for this field.
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
public readonly directives: Directive[];
- Type: Directive[]
- Default: no directives
the directives for this field.
Options for GraphQL Types.
import { GraphqlTypeOptions } from 'awscdk-appsync-utils'
const graphqlTypeOptions: GraphqlTypeOptions = { ... }
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. |
public readonly isList: boolean;
- Type: boolean
- Default: false
property determining if this attribute is a list i.e. if true, attribute would be [Type].
public readonly isRequired: boolean;
- Type: boolean
- Default: false
property determining if this attribute is non-nullable i.e. if true, attribute would be Type!
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! ]!
public readonly intermediateType: IIntermediateType;
- Type: IIntermediateType
- Default: no intermediate type
the intermediate type linked to this attribute.
Properties for configuring an Intermediate Type.
import { IntermediateTypeOptions } from 'awscdk-appsync-utils'
const intermediateTypeOptions: IntermediateTypeOptions = { ... }
Name | Type | Description |
---|---|---|
definition |
{[ key: string ]: IField} |
the attributes of this type. |
directives |
Directive[] |
the directives for this object type. |
public readonly definition: {[ key: string ]: IField};
- Type: {[ key: string ]: IField}
the attributes of this type.
public readonly directives: Directive[];
- Type: Directive[]
- Default: no directives
the directives for this object type.
Properties for configuring an Object Type.
import { ObjectTypeOptions } from 'awscdk-appsync-utils'
const objectTypeOptions: ObjectTypeOptions = { ... }
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. |
public readonly definition: {[ key: string ]: IField};
- Type: {[ key: string ]: IField}
the attributes of this type.
public readonly directives: Directive[];
- Type: Directive[]
- Default: no directives
the directives for this object type.
public readonly interfaceTypes: InterfaceType[];
- Type: InterfaceType[]
- Default: no interface types
The Interface Types this Object Type implements.
Properties for configuring a resolvable field.
import { ResolvableFieldOptions } from 'awscdk-appsync-utils'
const resolvableFieldOptions: ResolvableFieldOptions = { ... }
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. |
public readonly returnType: GraphqlType;
- Type: GraphqlType
The return type for this field.
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
public readonly directives: Directive[];
- Type: Directive[]
- Default: no directives
the directives for this field.
public readonly cachingConfig: CachingConfig;
- Type: aws-cdk-lib.aws_appsync.CachingConfig
- Default: No caching configuration
The caching configuration for this resolver.
public readonly code: Code;
- Type: aws-cdk-lib.aws_appsync.Code
- Default: no code is used
The function code.
public readonly dataSource: BaseDataSource;
- Type: aws-cdk-lib.aws_appsync.BaseDataSource
- Default: no data source
The data source creating linked to this resolvable field.
public readonly maxBatchSize: number;
- Type: number
- Default: No max batch size
The maximum number of elements per batch, when using batch invoke.
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.
public readonly requestMappingTemplate: MappingTemplate;
- Type: aws-cdk-lib.aws_appsync.MappingTemplate
- Default: No mapping template
The request mapping template for this resolver.
public readonly responseMappingTemplate: MappingTemplate;
- Type: aws-cdk-lib.aws_appsync.MappingTemplate
- Default: No mapping template
The response mapping template for this resolver.
public readonly runtime: FunctionRuntime;
- Type: aws-cdk-lib.aws_appsync.FunctionRuntime
- Default: no function runtime, VTL mapping templates used
The functions runtime.
Properties for SourceApiAssociationMergeOperation which handles triggering a merge operation as a custom resource during a Cloudformation stack update.
import { SourceApiAssociationMergeOperationProps } from 'awscdk-appsync-utils'
const sourceApiAssociationMergeOperationProps: SourceApiAssociationMergeOperationProps = { ... }
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. |
public readonly sourceApiAssociation: ISourceApiAssociation;
- Type: aws-cdk-lib.aws_appsync.ISourceApiAssociation
The source api association resource which will be merged.
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.
public readonly mergeOperationProvider: ISourceApiAssociationMergeOperationProvider;
The merge operation provider construct which is responsible for configuring the Lambda resource that will be invoked during Cloudformation update.
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.
Properties for SourceApiAssociationMergeOperationProvider.
import { SourceApiAssociationMergeOperationProviderProps } from 'awscdk-appsync-utils'
const sourceApiAssociationMergeOperationProviderProps: SourceApiAssociationMergeOperationProviderProps = { ... }
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. |
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.
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.
Properties for configuring an Union Type.
import { UnionTypeOptions } from 'awscdk-appsync-utils'
const unionTypeOptions: UnionTypeOptions = { ... }
Name | Type | Description |
---|---|---|
definition |
IIntermediateType[] |
the object types for this union type. |
public readonly definition: IIntermediateType[];
- Type: IIntermediateType[]
the object types for this union type.
- Implements: aws-cdk-lib.aws_appsync.ISchema
import { CodeFirstSchema } from 'awscdk-appsync-utils'
new CodeFirstSchema()
Name | Type | Description |
---|
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. |
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 }
- Type: string
the name of the Mutation.
- Type: ResolvableField
the resolvable field to for this Mutation.
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 }
- Type: string
the name of the query.
- Type: ResolvableField
the resolvable field to for this query.
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 }
- Type: string
the name of the Subscription.
- Type: Field
the resolvable field to for this Subscription.
public addToSchema(addition: string, delimiter?: string): void
Escape hatch to add to Schema as desired.
Will always result in a newline.
- Type: string
the addition to add to schema.
- Type: string
the delimiter between schema and addition.
public addType(type: IIntermediateType): IIntermediateType
Add type to the schema.
- Type: IIntermediateType
the intermediate type to add to the schema.
public bind(api: IGraphqlApi, _options?: SchemaBindOptions): ISchemaConfig
Called when the GraphQL Api is initialized to allow this object to bind to the stack.
- Type: aws-cdk-lib.aws_appsync.IGraphqlApi
The binding GraphQL Api.
- Type: aws-cdk-lib.aws_appsync.SchemaBindOptions
Name | Type | Description |
---|---|---|
definition |
string |
The definition for this schema. |
public readonly definition: string;
- Type: string
The definition for this schema.
Directives for types.
i.e.
Name | Description |
---|---|
toString |
Generate the directive statement. |
public toString(): string
Generate the directive statement.
Name | Description |
---|---|
apiKey |
Add the. |
cognito |
Add the. |
custom |
Add a custom directive. |
iam |
Add the. |
oidc |
Add the. |
subscribe |
Add the. |
import { Directive } from 'awscdk-appsync-utils'
Directive.apiKey()
Add the.
import { Directive } from 'awscdk-appsync-utils'
Directive.cognito(groups: ...string[])
Add the.
- Type: ...string[]
the groups to allow access to.
import { Directive } from 'awscdk-appsync-utils'
Directive.custom(statement: string)
Add a custom directive.
- Type: string
the directive statement to append.
import { Directive } from 'awscdk-appsync-utils'
Directive.iam()
Add the.
import { Directive } from 'awscdk-appsync-utils'
Directive.oidc()
Add the.
import { Directive } from 'awscdk-appsync-utils'
Directive.subscribe(mutations: ...string[])
Add the.
- Type: ...string[]
the mutation fields to link to.
Name | Type | Description |
---|---|---|
mode |
aws-cdk-lib.aws_appsync.AuthorizationType |
The authorization type of this directive. |
mutationFields |
string[] |
Mutation fields for a subscription directive. |
public readonly mode: AuthorizationType;
- Type: aws-cdk-lib.aws_appsync.AuthorizationType
- Default: not an authorization directive
The authorization type of this directive.
public readonly mutationFields: string[];
- Type: string[]
- Default: not a subscription directive
Mutation fields for a subscription directive.
- Implements: IIntermediateType
Enum Types are abstract types that includes a set of fields that represent the strings this type can create.
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. |
- Type: string
the name of this type.
- Type: EnumTypeOptions
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. |
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.
- Type: AddFieldOptions
the options to add a field.
public attribute(options?: BaseTypeOptions): GraphqlType
Create an GraphQL Type representing this Enum Type.
- Type: BaseTypeOptions
public toString(): string
Generate the string of this enum type.
Name | Type | Description |
---|---|---|
definition |
{[ key: string ]: IField} |
the attributes of this type. |
name |
string |
the name of this type. |
public readonly definition: {[ key: string ]: IField};
- Type: {[ key: string ]: IField}
the attributes of this type.
public readonly name: string;
- Type: string
the name of this type.
- Implements: IField
Fields build upon Graphql Types and provide typing and arguments.
import { Field } from 'awscdk-appsync-utils'
new Field(options: FieldOptions)
Name | Type | Description |
---|---|---|
options |
FieldOptions |
No description. |
- Type: FieldOptions
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. |
public argsToString(): string
Generate the args string of this resolvable field.
public directivesToString(modes?: AuthorizationType[]): string
Generate the directives for this field.
- Type: aws-cdk-lib.aws_appsync.AuthorizationType[]
public toString(): string
Generate the string for this attribute.
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. |
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { Field } from 'awscdk-appsync-utils'
Field.awsEmail(options?: BaseTypeOptions)
AWSEmail
scalar type represents an email address string (i.e.username@example.com
).
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { Field } from 'awscdk-appsync-utils'
Field.awsIpAddress(options?: BaseTypeOptions)
AWSIPAddress
scalar type respresents a valid IPv4
of IPv6
address string.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { Field } from 'awscdk-appsync-utils'
Field.awsJson(options?: BaseTypeOptions)
AWSJson
scalar type represents a JSON string.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { Field } from 'awscdk-appsync-utils'
Field.boolean(options?: BaseTypeOptions)
Boolean
scalar type is a boolean value: true or false.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { Field } from 'awscdk-appsync-utils'
Field.float(options?: BaseTypeOptions)
Float
scalar type is a signed double-precision fractional value.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { Field } from 'awscdk-appsync-utils'
Field.int(options?: BaseTypeOptions)
Int
scalar type is a signed non-fractional numerical value.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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).
- Type: GraphqlTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList - intermediateType.
import { Field } from 'awscdk-appsync-utils'
Field.string(options?: BaseTypeOptions)
String
scalar type is a free-form human-readable text.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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. |
public readonly isList: boolean;
- Type: boolean
- Default: false
property determining if this attribute is a list i.e. if true, attribute would be [Type]
.
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.
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.
public readonly type: Type;
- Type: Type
the type of attribute.
public readonly intermediateType: IIntermediateType;
- Type: IIntermediateType
- Default: no intermediate type
the intermediate type linked to this attribute (i.e. an interface or an object).
public readonly fieldOptions: ResolvableFieldOptions;
- Type: ResolvableFieldOptions
- Default: no arguments
The options for this field.
- Implements: IField
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.
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. |
- Type: Type
the type of attribute.
- Type: GraphqlTypeOptions
Name | Description |
---|---|
argsToString |
Generate the arguments for this field. |
directivesToString |
Generate the directives for this field. |
toString |
Generate the string for this attribute. |
public argsToString(): string
Generate the arguments for this field.
public directivesToString(_modes?: AuthorizationType[]): string
Generate the directives for this field.
- Type: aws-cdk-lib.aws_appsync.AuthorizationType[]
public toString(): string
Generate the string for this attribute.
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. |
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { GraphqlType } from 'awscdk-appsync-utils'
GraphqlType.awsEmail(options?: BaseTypeOptions)
AWSEmail
scalar type represents an email address string (i.e.username@example.com
).
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { GraphqlType } from 'awscdk-appsync-utils'
GraphqlType.awsIpAddress(options?: BaseTypeOptions)
AWSIPAddress
scalar type respresents a valid IPv4
of IPv6
address string.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { GraphqlType } from 'awscdk-appsync-utils'
GraphqlType.awsJson(options?: BaseTypeOptions)
AWSJson
scalar type represents a JSON string.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { GraphqlType } from 'awscdk-appsync-utils'
GraphqlType.boolean(options?: BaseTypeOptions)
Boolean
scalar type is a boolean value: true or false.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { GraphqlType } from 'awscdk-appsync-utils'
GraphqlType.float(options?: BaseTypeOptions)
Float
scalar type is a signed double-precision fractional value.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { GraphqlType } from 'awscdk-appsync-utils'
GraphqlType.int(options?: BaseTypeOptions)
Int
scalar type is a signed non-fractional numerical value.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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).
- Type: GraphqlTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList - intermediateType.
import { GraphqlType } from 'awscdk-appsync-utils'
GraphqlType.string(options?: BaseTypeOptions)
String
scalar type is a free-form human-readable text.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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). |
public readonly isList: boolean;
- Type: boolean
- Default: false
property determining if this attribute is a list i.e. if true, attribute would be [Type]
.
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.
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.
public readonly type: Type;
- Type: Type
the type of attribute.
public readonly intermediateType: IIntermediateType;
- Type: IIntermediateType
- Default: no intermediate type
the intermediate type linked to this attribute (i.e. an interface or an object).
- Implements: IIntermediateType
Input Types are abstract types that define complex objects.
They are used in arguments to represent
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. |
- Type: string
the name of this type.
- Type: IntermediateTypeOptions
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. |
public addField(options: AddFieldOptions): void
Add a field to this Input Type.
Input Types must have both fieldName and field options.
- Type: AddFieldOptions
the options to add a field.
public attribute(options?: BaseTypeOptions): GraphqlType
Create a GraphQL Type representing this Input Type.
- Type: BaseTypeOptions
the options to configure this attribute.
public toString(): string
Generate the string of this input type.
Name | Type | Description |
---|---|---|
definition |
{[ key: string ]: IField} |
the attributes of this type. |
name |
string |
the name of this type. |
public readonly definition: {[ key: string ]: IField};
- Type: {[ key: string ]: IField}
the attributes of this type.
public readonly name: string;
- Type: string
the name of this type.
- Implements: IIntermediateType
Interface Types are abstract types that includes a certain set of fields that other types must include if they implement the interface.
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. |
- Type: string
the name of this type.
- Type: IntermediateTypeOptions
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. |
public addField(options: AddFieldOptions): void
Add a field to this Interface Type.
Interface Types must have both fieldName and field options.
- Type: AddFieldOptions
the options to add a field.
public attribute(options?: BaseTypeOptions): GraphqlType
Create a GraphQL Type representing this Intermediate Type.
- Type: BaseTypeOptions
the options to configure this attribute.
public toString(): string
Generate the string of this object type.
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. |
public readonly definition: {[ key: string ]: IField};
- Type: {[ key: string ]: IField}
the attributes of this type.
public readonly name: string;
- Type: string
the name of this type.
public readonly directives: Directive[];
- Type: Directive[]
- Default: no directives
the directives for this object type.
- Implements: IIntermediateType
Object Types are types declared by you.
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. |
- Type: string
the name of this type.
- Type: ObjectTypeOptions
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. |
public addField(options: AddFieldOptions): void
Add a field to this Object Type.
Object Types must have both fieldName and field options.
- Type: AddFieldOptions
the options to add a field.
public attribute(options?: BaseTypeOptions): GraphqlType
Create a GraphQL Type representing this Intermediate Type.
- Type: BaseTypeOptions
the options to configure this attribute.
public toString(): string
Generate the string of this object type.
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. |
public readonly definition: {[ key: string ]: IField};
- Type: {[ key: string ]: IField}
the attributes of this type.
public readonly name: string;
- Type: string
the name of this type.
public readonly directives: Directive[];
- Type: Directive[]
- Default: no directives
the directives for this object type.
public readonly interfaceTypes: InterfaceType[];
- Type: InterfaceType[]
- Default: no interface types
The Interface Types this Object Type implements.
public readonly resolvers: Resolver[];
- Type: aws-cdk-lib.aws_appsync.Resolver[]
The resolvers linked to this data source.
- Implements: IField
Resolvable Fields build upon Graphql Types and provide fields that can resolve into operations on a data source.
import { ResolvableField } from 'awscdk-appsync-utils'
new ResolvableField(options: ResolvableFieldOptions)
Name | Type | Description |
---|---|---|
options |
ResolvableFieldOptions |
No description. |
- Type: ResolvableFieldOptions
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. |
public argsToString(): string
Generate the args string of this resolvable field.
public directivesToString(modes?: AuthorizationType[]): string
Generate the directives for this field.
- Type: aws-cdk-lib.aws_appsync.AuthorizationType[]
public toString(): string
Generate the string for this attribute.
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. |
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { ResolvableField } from 'awscdk-appsync-utils'
ResolvableField.awsEmail(options?: BaseTypeOptions)
AWSEmail
scalar type represents an email address string (i.e.username@example.com
).
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { ResolvableField } from 'awscdk-appsync-utils'
ResolvableField.awsIpAddress(options?: BaseTypeOptions)
AWSIPAddress
scalar type respresents a valid IPv4
of IPv6
address string.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { ResolvableField } from 'awscdk-appsync-utils'
ResolvableField.awsJson(options?: BaseTypeOptions)
AWSJson
scalar type represents a JSON string.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { ResolvableField } from 'awscdk-appsync-utils'
ResolvableField.boolean(options?: BaseTypeOptions)
Boolean
scalar type is a boolean value: true or false.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { ResolvableField } from 'awscdk-appsync-utils'
ResolvableField.float(options?: BaseTypeOptions)
Float
scalar type is a signed double-precision fractional value.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
import { ResolvableField } from 'awscdk-appsync-utils'
ResolvableField.int(options?: BaseTypeOptions)
Int
scalar type is a signed non-fractional numerical value.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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).
- Type: GraphqlTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList - intermediateType.
import { ResolvableField } from 'awscdk-appsync-utils'
ResolvableField.string(options?: BaseTypeOptions)
String
scalar type is a free-form human-readable text.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
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. |
public readonly isList: boolean;
- Type: boolean
- Default: false
property determining if this attribute is a list i.e. if true, attribute would be [Type]
.
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.
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.
public readonly type: Type;
- Type: Type
the type of attribute.
public readonly intermediateType: IIntermediateType;
- Type: IIntermediateType
- Default: no intermediate type
the intermediate type linked to this attribute (i.e. an interface or an object).
public readonly fieldOptions: ResolvableFieldOptions;
- Type: ResolvableFieldOptions
- Default: not a resolvable field
The options to make this field resolvable.
- Implements: IIntermediateType
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.
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. |
- Type: string
the name of this type.
- Type: UnionTypeOptions
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. |
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.
- Type: AddFieldOptions
the options to add a field.
public attribute(options?: BaseTypeOptions): GraphqlType
Create a GraphQL Type representing this Union Type.
- Type: BaseTypeOptions
the options to configure this attribute.
public toString(): string
Generate the string of this Union type.
Name | Type | Description |
---|---|---|
definition |
{[ key: string ]: IField} |
the attributes of this type. |
name |
string |
the name of this type. |
public readonly definition: {[ key: string ]: IField};
- Type: {[ key: string ]: IField}
the attributes of this type.
public readonly name: string;
- Type: string
the name of this type.
- Implemented By: Field, GraphqlType, ResolvableField, IField
A Graphql Field.
Name | Description |
---|---|
argsToString |
Generate the arguments for this field. |
directivesToString |
Generate the directives for this field. |
toString |
Generate the string for this attribute. |
public argsToString(): string
Generate the arguments for this field.
public directivesToString(modes?: AuthorizationType[]): string
Generate the directives for this field.
- Type: aws-cdk-lib.aws_appsync.AuthorizationType[]
the authorization modes of the graphql api.
public toString(): string
Generate the string for this attribute.
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). |
public readonly isList: boolean;
- Type: boolean
- Default: false
property determining if this attribute is a list i.e. if true, attribute would be [Type]
.
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.
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.
public readonly type: Type;
- Type: Type
the type of attribute.
public readonly fieldOptions: ResolvableFieldOptions;
- Type: ResolvableFieldOptions
- Default: not a resolvable field
The options to make this field resolvable.
public readonly intermediateType: IIntermediateType;
- Type: IIntermediateType
- Default: no intermediate type
the intermediate type linked to this attribute (i.e. an interface or an object).
- Implemented By: EnumType, InputType, InterfaceType, ObjectType, UnionType, IIntermediateType
Intermediate Types are types that includes a certain set of fields that define the entirety of your schema.
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. |
public addField(options: AddFieldOptions): void
Add a field to this Intermediate Type.
- Type: AddFieldOptions
public attribute(options?: BaseTypeOptions): GraphqlType
Create an GraphQL Type representing this Intermediate Type.
- Type: BaseTypeOptions
the options to configure this attribute - isList - isRequired - isRequiredList.
public toString(): string
Generate the string of this object type.
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. |
public readonly definition: {[ key: string ]: IField};
- Type: {[ key: string ]: IField}
the attributes of this type.
public readonly name: string;
- Type: string
the name of this type.
public readonly directives: Directive[];
- Type: Directive[]
- Default: no directives
the directives for this object type.
public readonly interfaceTypes: InterfaceType[];
- Type: InterfaceType[]
- Default: no interface types
The Interface Types this Intermediate Type implements.
public readonly intermediateType: IIntermediateType;
- Type: IIntermediateType
- Default: no intermediate type
the intermediate type linked to this attribute (i.e. an interface or an object).
public readonly resolvers: Resolver[];
- Type: aws-cdk-lib.aws_appsync.Resolver[]
The resolvers linked to this data source.
-
Extends: constructs.IConstruct
-
Implemented By: SourceApiAssociationMergeOperationProvider, ISourceApiAssociationMergeOperationProvider
This interface for the provider of the custom resource that will be used to initiate a merge operation during Cloudformation update.
Name | Description |
---|---|
associateSourceApiAssociation |
This function associates a source api association with the provider. |
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.
- Type: aws-cdk-lib.aws_appsync.ISourceApiAssociation
The association to associate.
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. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly serviceToken: string;
- Type: string
Service token which is used for identifying the handler used for the merge operation custom resource.
Enum containing the Types that can be used to define ObjectTypes.
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
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
scalar type is a free-form human-readable text.
Int
scalar type is a signed non-fractional numerical value.
Float
scalar type is a signed double-precision fractional value.
Boolean
scalar type is a boolean value: true or false.
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.
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.
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
AWSTimestamp
scalar type represents the number of seconds since 1970-01-01T00:00Z
.
Timestamps are serialized and deserialized as numbers.
AWSEmail
scalar type represents an email address string (i.e.username@example.com
).
AWSJson
scalar type represents a JSON string.
AWSURL
scalar type represetns a valid URL string.
URLs wihtout schemes or contain double slashes are considered invalid.
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.
AWSIPAddress
scalar type respresents a valid IPv4
of IPv6
address string.
Type used for Intermediate Types (i.e. an interface or an object type).