Recently our CI builds have started failing during graphql-codegen. Our app is based on the Remix template provided by Shopify:
> graphql-codegen -p admin
✔ Parse Configuration
⚠ Generate outputs
❯ Generate to ./app/types/admin-2024-07.schema.json
✔ Load GraphQL schemas
✔ Load GraphQL documents
✖ Input Object type MetafieldAccessGrantOperationInput must define one or more fields.
❯ Generate to ./app/types/admin.types.ts
✔ Load GraphQL schemas
✔ Load GraphQL documents
✖ Input Object type MetafieldAccessGrantOperationInput must define one or more fields.
✔ Generate to ./app/types/admin.generated.ts
Is anyone else experiencing this? It seems like something was deployed that’s broken the schema types.
We’re experiencing the same issue with our builds. A recent deployment has introduced a broken schema, specifically with the MetafieldAccessGrantOperationInput type. Looks like we’re not the only ones affected!
Can confirm that this is a widespread error. It also affects the official GraphiQL interface for Shopify: the above error message shows up when the query result pane initially loads, and the schema documentation is missing from the left sidebar
A temporary fix is to disable the validation that happens while generating the types, using the skipDocumentsValidation option in the codegen config (reference)