Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add modelIntrospectionSchema to graphql api surface #2988

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ export class AmplifyGraphqlApi extends Construct {
*/
public readonly apiId: string;

/**
* Model introspection schema
*/
public readonly modelIntrospectionSchema?: string;

/**
* DataStore conflict resolution setting
*/
Expand Down Expand Up @@ -158,8 +163,11 @@ export class AmplifyGraphqlApi extends Construct {
functionNameMap,
outputStorageStrategy,
dataStoreConfiguration,
modelIntrospectionSchema,
} = props;

this.modelIntrospectionSchema = modelIntrospectionSchema;

if (conflictResolution && dataStoreConfiguration) {
throw new Error(
'conflictResolution is deprecated. conflictResolution and dataStoreConfiguration cannot be used together. Please use dataStoreConfiguration.',
Expand Down
10 changes: 10 additions & 0 deletions packages/amplify-graphql-api-construct/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,11 @@ export interface AmplifyGraphqlApiProps {
* For more information, refer to https://docs.amplify.aws/lib/datastore/getting-started/q/platform/js/
*/
readonly dataStoreConfiguration?: DataStoreConfiguration;

/**
* The model introspection schema for this graphql schema
*/
readonly modelIntrospectionSchema?: string;
}

/**
Expand Down Expand Up @@ -859,6 +864,11 @@ export interface AmplifyGraphqlApiResources {
* Nested Stacks generated by the Api Construct.
*/
readonly nestedStacks: Record<string, NestedStack>;

/**
* Model introspection schema
*/
readonly modelIntrospectionSchema?: string;
}

/**
Expand Down
Loading