1.0.0 • Published 7 years ago
graphqlq v1.0.0
GraphQLq
GraphQL Query Builder.
Usage
Install the package using NPM:
$ npm install graphqlq
Or using YARN:
$ yarn add graphqlq
Then import the package:
/* ES6 Import */
import { q, qq } from 'graphqlq'
/* ES5 Require */
const { q, qq } = require('graphqlq')
To create a new GraphQL query, use qq
.
qq('AcquireSongInfo', 'songs', ['artist', 'title'])
// => "query AcquireSongInfo{songs{artist,title}}"
To create a partial GraphQL query, use q
.
q('songs', ['artist', 'title'])
// => "songs{artist,title}"
For more info, read the documentation.
1.0.0
7 years ago