You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* eslint-disable global-require *//** * @type {import('eslint').ESLint.Options} */module.exports={extends: ['eslint-config-ns-ts',],plugins: ['graphql']overrides: [{files: ['*.graphql','.gql'],rules: {/** * Graphql linting * * This plugin also lints GraphQL literal files ending on .gql or .graphql. * In order to do so set env to 'literal' to tell eslint to check these * files as well. */'graphql/template-strings': ['error',{env: 'apollo',schemaJson: require('./graphql/schema.json'),},{validators: ['FieldsOnCorrectTypeRule','NoFragmentCyclesRule','UniqueOperationNamesRule','UniqueArgumentNamesRule',],env: 'literal',schemaJson: require('./graphql/schema.json'),},],'graphql/named-operations': ['error',{env: 'literal',schemaJson: require('./graphql/schema.json'),},],'graphql/no-deprecated-fields': ['warn',{env: 'literal',schemaJson: require('./graphql/schema.json'),},],// 'graphql/required-fields': [// 'error',// {// env: 'literal',// schemaJson: require('./graphql/schema.json'),// /**// * ensure that we never miss adding `id` to queries, as this can// * lead to nasty issues with apollo.// */// requiredFields: ['id'],// },// ],},},],}
Tasks
define how to provide schemaJson files (1 and multiple/different ones).
add note that currently only @apollo/client code is tested
Feature Request
Support using
.graphql
files in your project.Basic example
Tasks
schemaJson
files (1 and multiple/different ones).@apollo/client
code is testedNotes
The text was updated successfully, but these errors were encountered: