Check your GraphQL query strings against a schema.
npm install tslint-plugin-graphql --save-dev
Example of tslint.json
{
"extends": [
"tslint:latest",
"tslint-plugin-graphql"
],
"rules": {
"object-literal-sort-keys": false,
"graphql": [
true,
{
// Import default settings for your GraphQL client. Supported values:
// 'apollo', 'relay', 'lokka'
"env": "apollo",
"schemaJsonFilepath": "./graphql.schema.json",
"tagName": "Relay.QL"
// tagName is gql by default
}
]
}
}
npm install
npm test