-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-appsyncRelated to AWS AppSyncRelated to AWS AppSynceffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.p2
Description
Allow custom object type definition for schema.
Use Case
Would allow for object type definition for schema generated using a code-first approach.
Proposed Solution
const api = new GraphQLApi(stack, 'ExampleApi', {
name: 'example',
schemaDefinition: SCHEMA.CODE,
...
});
// Defining attribute types (i.e. Int! and String!)
const t_int_r = AttributeType.int().required();
const t_string_r = AttributeType.string().required();
// Defining Object Type ( i.e. type Example @aws_iam { id: Int! content: String! } )
const example = api.addType('Example', {
definition: {
id: t_int_r,
content: t_string_r,
},
directives: Directives.iam(),
});api.addType would return ObjectType so that other types can reference it.
Other
Tracked by: #9305
This is a 🚀 Feature Request
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-appsyncRelated to AWS AppSyncRelated to AWS AppSynceffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.p2