gql-now
v2.0.2
Published
Very thin gql client
Downloads
8
Readme
gql-now
A simple nodejs/browser client to hit graphql apis
Install
npm install --save gql-now
Usage
import {GQLNow} from "gql-now";
let obj = new GQLNow("https://some.graphql.api/api/path",{'http_header1':'header_value1'});
// Query operation
let respnse = await obj.query("operation_name",{ field1:"value1" , field2:"value2", field3:4},"response_field response_field_neseted{ nested_field1 nested_field2 }");
// Mutation operation
let response_mutation = await obj.mutation("operation_name",{ field1:"value1" , field2:"value2", field3:4},"response_field response_field_neseted{ nested_field1 nested_field2 }");