Skip to content

Instantly share code, notes, and snippets.

@mgjam
Last active October 27, 2019 15:55
Show Gist options
  • Save mgjam/eb5cf33b4705bd664be924915baeece1 to your computer and use it in GitHub Desktop.
Save mgjam/eb5cf33b4705bd664be924915baeece1 to your computer and use it in GitHub Desktop.
private createSchema(
api: appsync.CfnGraphQLApi
): appsync.CfnGraphQLSchema {
const name = 'Schema';
const definition = `
type Output {
Numbers: [Int!]!
}
type Query {
getOutput(number: Int!, count: Int!): Output!
}
`;
const schema = new appsync.CfnGraphQLSchema(this, name, {
apiId: api.attrApiId,
definition: definition
});
schema.addDependsOn(api);
return schema;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment