@charlietango/sort-schema-args

Sort arguments in GraphQL schema

Usage no npm install needed!

<script type="module">
  import charlietangoSortSchemaArgs from 'https://cdn.skypack.dev/@charlietango/sort-schema-args';
</script>

README

Sort Schema Args

Plugin to ensure sorting order of arguments in GraphQL. It should be used with graphql-code-generator/. While not required by the spec, some plugins expect the order to match, or they will fail.

It builds on top of the normal GraphQL introspection plugin, so you can use this instead.

Setup

schema: my-schema.graphql
documents: "./src/**/*.graphql"
generates:
  output.ts:
    - "@charlietango/sort-schema-args"

Umbraco Heartcore fixes

The applies a set of fixes need to fix Umbraco Heartcore.

schema: my-schema.graphql
documents: './src/**/*.graphql'
generates:
  output.ts:
    plugins:
      - '@charlietango/sort-schema-args'
          heartcore: true