Skip to content

rtalwar26/gql-now

Repository files navigation

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

About

Very thin gql client for browser and nodejs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published