cdklabs / cdklabs/awscdk-appsync-utils

Output schema definition?

Open
#201 1 comment 0 reactions 1 assignee Claimed by @MrArnoldPalmer View on GitHub
Dominant language
TypeScript
Stars
26
Forks
6
Avg merge
9m
Merged PRs (30d)
4

Description

What is the correct way to resolve and output the schema definition? The schema is added to AppSync successfully so does exist, however, I always get "" in CfnOutputs.

```js
this.awsAppsyncSchema = new cdk.CfnOutput(this, "awsAppsyncSchema", {
value: this.resolve( base_api.apiSchema.definition ),
});
```

In the appsync-alpha I successfully used this, but `.definition` isn't available when I update it to `appsync.ISchema`.

```js
this.awsAppsyncSchema = new cdk.CfnOutput(this, "awsAppsyncSchema", {
value: this.resolve( ( base_api.api.schema as unknown as { schema: appsync.Schema } ).schema.definition ),
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.