interface UnionTypeOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppSync.UnionTypeOptions |
Java | software.amazon.awscdk.services.appsync.UnionTypeOptions |
Python | aws_cdk.aws_appsync.UnionTypeOptions |
TypeScript (source) | @aws-cdk/aws-appsync » UnionTypeOptions |
Properties for configuring an Union Type.
Example
declare const api: appsync.GraphqlApi;
const string = appsync.GraphqlType.string();
const human = new appsync.ObjectType('Human', { definition: { name: string } });
const droid = new appsync.ObjectType('Droid', { definition: { name: string } });
const starship = new appsync.ObjectType('Starship', { definition: { name: string } }););
const search = new appsync.UnionType('Search', {
definition: [ human, droid, starship ],
});
api.addType(search);
Properties
Name | Type | Description |
---|---|---|
definition | IIntermediate [] | the object types for this union type. |
definition
Type:
IIntermediate
[]
the object types for this union type.