Neverending Pile of Messages
Wondering what’s next for npm?Check out our public roadmap! »

gql-now

1.0.3 • Public • Published

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 }");

Install

npm i gql-now

DownloadsWeekly Downloads

70

Version

1.0.3

License

ISC

Unpacked Size

12.4 kB

Total Files

15

Last publish

Collaborators

  • avatar