1.0.1 • Published 7 years ago
gql-tag v1.0.1
gql-tag
An useful utilities, help to highlight、format、auto-compelete Graphql code in you Editor.
Installation
yarn add gql-tagUsage
import gql from 'gql-tag'
const QUERY_TODO = `
  query Todos($id: ID) {
    todo(id: 5) {
      id
      title
    }
  }
`
const GET_TODO_GQL = gql`
  query Todos($id: ID) {
    todo(id: 5) {
      id
      title
    }
  }
`
expect(QUERY_TODO).toBe(GET_TODO_GQL) // pass