Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Latest commit

 

History

History
55 lines (41 loc) · 1.82 KB

README.md

File metadata and controls

55 lines (41 loc) · 1.82 KB

tslint-plugin-graphql

Greenkeeper badge

Check your GraphQL query strings against a schema.

NPM version Build Status Dependency Status Coverage percentage experimental

Install

npm install tslint-plugin-graphql --save-dev

Usage

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 
            }
        ]
    }
}

API

Test

npm install
npm test