Skip to content

Commit

Permalink
fix: remove async map generic dataschema
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Shih committed Sep 27, 2023
1 parent 905e11b commit 9eade9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const run = async (context: $TSContext, eventType: 'PostPush' | 'PostPull
studioClient.isGraphQLSupported ? getAmplifyDataSchema(context) : Promise.resolve(undefined),
]);
const genericDataSchema = dataSchema ? mapGenericDataSchemaToCodegen(dataSchema) : undefined;

const canGenerateDataComponents = genericDataSchema && studioClient.isGraphQLSupported;

const apiConfiguration: AmplifyUIBuilder.ApiConfiguration = canGenerateDataComponents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const mapDataFieldsToCodegen = (fields: { [fieldName: string]: GenericDataField
return codegenFields;
};

export const mapGenericDataSchemaToCodegen = async (genericDataSchema: GenericDataSchema): CodegenJobGenericDataSchema | undefined => {
export const mapGenericDataSchemaToCodegen = (genericDataSchema: GenericDataSchema): CodegenJobGenericDataSchema => {
const { models, nonModels, enums, dataSourceType } = genericDataSchema;
const codegenModels: { [key: string]: CodegenGenericDataModel } = {};
const codegenNonModels: { [key: string]: CodegenGenericDataNonModel } = {};
Expand Down
12 changes: 1 addition & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12857,7 +12857,7 @@ __metadata:
languageName: node
linkType: hard

"@types/node-fetch@npm:2.6.4":
"@types/node-fetch@npm:2.6.4, @types/node-fetch@npm:^2.6.1":
version: 2.6.4
resolution: "@types/node-fetch@npm:2.6.4"
dependencies:
Expand All @@ -12867,16 +12867,6 @@ __metadata:
languageName: node
linkType: hard

"@types/node-fetch@npm:^2.6.1":
version: 2.6.1
resolution: "@types/node-fetch@npm:2.6.1"
dependencies:
"@types/node": "*"
form-data: ^3.0.0
checksum: e43e4670ed8b7693dbf660ac1450b14fcfcdd8efca1eb0f501b6ad95af2d1fa06f8541db03e9511e82a5fee510a238fe0913330c9a58f8ac6892b985f6dd993e
languageName: node
linkType: hard

"@types/node@npm:*, @types/node@npm:^18.16.1":
version: 18.16.1
resolution: "@types/node@npm:18.16.1"
Expand Down

0 comments on commit 9eade9e

Please sign in to comment.