format-graphql
format-graphql copied to clipboard
Formats GraphQL schema definition language (SDL) document.
When running the formatter against schemas with extension, the following error is displayed: ``` ***/app/node_modules/format-graphql/dist/utilities/formatSdl.js:30 return a.name.value.localeCompare(b.name.value); ^ TypeError: Cannot read properties of undefined (reading 'value') at ***/app/node_modules/format-graphql/dist/utilities/formatSdl.js:30:48 at Array.sort...
We use `format-graphql` along side the `graphql-schema-linter` package (via https://pre-commit.com/) `graphql-schema-linter` provides the means to disable some of it's lint checks (unused types, camel casing) https://github.com/cjoudrey/graphql-schema-linter#inline-rule-overrides However, when using it...
Currently we have multiple GraphQL files in our source code and I need to run this for each file individually. It would be much more convenient if globs were supported....
An option to sort enumerations would be nice.
It would be useful to have the option to group definitions by type, which would later be sorted. In other words interfaces together, enums together etc.