gqlint is a linter for GraphQL's schemas and queries.
gqlint can be installed by go install command.
$ go install github.com/gqlgo/gqlint@latestThe gqlint command has two flags, schema and query which will be parsed and analyzed by analyzers.
$ gqlint -schema="server/graphql/schema/**/*.graphql" -query="client/**/*.graphql"The default value of schema is "schema/*/**.graphql" and query is query/*/**.graphql.
schema flag accepts URL for a endpoint of GraphQL server.
lackid will get schemas by an introspection query via the endpoint.
$ gqlint -schema="https://example.com" -query="client/**/*.graphql"gqlint is a collection of below analyzers.
- gqlgo/lackid - Detect lack of id in GraphQL query