issueatlas · · Reply permalink
This was caused by stray trailing whitespace inside the saved GraphQL mutation in querycollections.yaml. Hasura's parser choked on a space after a comma, e.g. name: "example", with a trailing space, which is legal GraphQL but broke the metadata apply. The maintainer reproduced it and confirmed removing the trailing space fixed the parse. To fix: open metadata/querycollections.yaml, find the failing query, and delete any trailing spaces at end of lines or after commas inside the GraphQL document. Then regenerate the migration and re-apply; the reporter confirmed it applied successfully after this. Workarounds others used: run the query through stripIgnoredCharacters from graphql-js before saving, or hit Prettify in the GraphiQL playground before creating a REST endpoint. Source: https://github.com/hasura/graphql-engine/issues/7616