Closed BBopanna closed 1 day ago
Same for me!, i have many amplify projects. Today in one of them I ran "amplify codegen" and get the same error.
I tried with another project that i havent modified the code in many days (and was working) and got the same error.
Here my src/graphql/schema.json schema.json
OS: Windows 11 Node: 20.12.2 Amplify: 12.13.0
We also receive following error for node version v21.6.1 :
The command we are running is: npx @aws-amplify/cli codegen add --apiId XYX --region xx-central-x
"Invalid or incomplete schema, unknown type: AWSModelQueryMap. Ensure that a full introspection query is used in order to build a client schema."
same here
Same here:
Node: 18.20.4 Amplify: 12.10.3
This should be raised as critical, because is breaking all pipelines
This has broken our Amplify pipelines as well. Suspicions are an updated 3rd party lib since it's happening across Amplify versions.
12.13.0 here Node 18.16.1
This issue just resolved itself for me without any further changes/input.
These jokers at AWS - Amplify have the least professional etiquette IMHO as they simply dont care - when the entire community is hit by this error - no response yet.
This is what addressed for us - Credit to - Nishant B from internal developer support team who asked us to try these
amplify codegen remove amplify codegen add amplify codegen amplify api gql-compile amplify codegen
you will notice that below changes in .graphqlconfig.yml
projects:
wfGraphQLAPI:
- schemaPath: src/graphql/schema.json
+ schemaPath: amplify/backend/api/wfGraphQLAPI/build/schema.graphql
includes:
- src/graphql/**/*.ts
excludes:
AND
codeGenTarget: typescript
generatedFileName: src/API.ts
docsFilePath: src/graphql
+ region: ap-south-1
+ apiId: null
maxDepth: 3
extensions:
amplify:
The fix has been deployed to impacted regions. Please try running the amplify codegen
and share your region information if you are still facing this issue.
Closing the issue as a fix has been deployed and verified.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v20.18.0
Amplify CLI Version
12.13.0
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
NO
Describe the bug
amplify codegen is giving the below error from today for now reason - we did not change anything in our schema and yet this error and does NOT generate the models, queries, mutations etc
➜ amplify codegen ✔ Downloaded the schema Invalid or incomplete schema, unknown type: AWSModelQueryMap. Ensure that a full introspection query is used in order to build a client schema.
Expected behavior
codegen should successfully generate models, queries, mutations
Reproduction steps
run the below command
amplify codegen
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm: