eslint-plugin-graphql
eslint-plugin-graphql copied to clipboard
:vertical_traffic_light: Check your GraphQL query strings against a schema.
Hi, I am trying to use the `eslint-plugin-graphql` but it doesn't catch my graphql error. Here's my eslintrc.js (I've reduced it to the relevant parts only) : ``` module.exports =...
Now that apollo-link-state allows for local resolvers, this plugin throws errors on those local resolvers. Can we get an update to pass the root resolver or something into the plugin...
Using AWS AppSync you can export both a `.graphql` schema, and a full `.json` schema. The `.graphql` is your basic actual definitions: ```graphql schema { query: AAAAAAAAAAA } type AAAAAAAAAAA...
Currently it seems we have to specify each and every rule we want to enable. This is good for advanced usage, but it's nice to be able to just extend...
``` // .eslintrc.js module.exports = { rules: { 'graphql/capitalized-type-name': [ 'warn', { schemaJson: require('./src/api-schema.json') }, ] } }; ``` ``` // typeDefs.js const gql = require('graphql-tag'); const typeDefs = gql`...
Hello there! Here's my `./src/BadMutation.graphql` file: ```graphql mutation BadMutation($input: Boolean!) { thisFieldDoesNotExist(input: $input) } ``` Here's my `.eslintrc.js` file. I've reduced it to the relevant parts only: ```js const schema...
Specifying both `env` and `tagName` is causing rules to silently fail internally with out any errors: ```js // this works 'graphql/template-strings': [ 'error', { // I'm using .graphqlconfig to import...
In our query files, we use ${abc} inside a lot in Javascript files. This seems a deal breaker to use this library. How can I exclude this rule out? `...
My configuration: ```javascript 'graphql/required-fields': [ 'error', { env: 'apollo', schemaJson: require('./schema.json'), requiredFields: ['id'], }, { env: 'literal', schemaJson: require('./schema.json'), requiredFields: ['id'], }, ], ``` My query: ```graphql query Main {...
This PR attempts to improve the documentation around having a multi project setup using `*.graphql` files. Closes #110 Closes #235