{"_id":"graphql-client","_rev":"14-f4e75aedcb7c84ca9c0271abaa450d89","name":"graphql-client","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"graphql-client","version":"1.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","gitHead":"156020a786506e5284448c759ab8a79c1776b4f5","_id":"graphql-client@1.0.0","_shasum":"0f877587acddd27c18a0605bc40ad02926321aa1","_from":".","_npmVersion":"3.5.0","_nodeVersion":"4.1.1","_npmUser":{"name":"simon.nord","email":"simon@nord.org"},"dist":{"shasum":"0f877587acddd27c18a0605bc40ad02926321aa1","tarball":"https://registry.npmjs.org/graphql-client/-/graphql-client-1.0.0.tgz","integrity":"sha512-rQV7TTNqJMASCu53hs+SAKp81IrEk8z05fx2wvWzclqVVNDdV8U8BMolYhrzrKD77HClrmnzY4YWkM7dIsRZqQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiBCRPsJGJH8IgusmHIVB2kcM5oTOu0LKP+Ne4LOFJPgIgb0Q60H46XFe7R3TiaKj/4rHp5mYsPDHJF3LVmfU+zvU="}]},"maintainers":[{"name":"simon.nord","email":"simon@nord.org"}],"directories":{}},"1.0.1":{"name":"graphql-client","version":"1.0.1","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","gitHead":"fe1c547010e9824a847426b08421c631d89c49b2","_id":"graphql-client@1.0.1","_shasum":"5061da05b7590026e0a4e111813ac376ab062442","_from":".","_npmVersion":"3.5.0","_nodeVersion":"4.1.1","_npmUser":{"name":"simon.nord","email":"simon@nord.org"},"dist":{"shasum":"5061da05b7590026e0a4e111813ac376ab062442","tarball":"https://registry.npmjs.org/graphql-client/-/graphql-client-1.0.1.tgz","integrity":"sha512-tlvORNdsnZzAfCStf17g3A0U2u93f9YphFWfxAS6xXG/QwtniI2Wk97Qu72YrEBIboaa0CP5RFjZctQjNtwAeg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHfZBRfyNdz4n1gGqjCcNMgZvBfjNdlNPjEN6hk5aofwAiEAx1nmrhD4rqG3dsSckly23LHWlXAFwvhzn2jqmsZUREo="}]},"maintainers":[{"name":"simon.nord","email":"simon@nord.org"}],"directories":{}},"1.0.2":{"name":"graphql-client","version":"1.0.2","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","dependencies":{"isomorphic-fetch":"^2.2.1"},"gitHead":"9d0fe99b9a8b824d9a8819e7ba82cadf3a10371f","_id":"graphql-client@1.0.2","_shasum":"b949a5b47afdcdbc25ebe437d11c94ab8c5d9dff","_from":".","_npmVersion":"3.5.0","_nodeVersion":"4.1.1","_npmUser":{"name":"simon.nord","email":"simon@nord.org"},"dist":{"shasum":"b949a5b47afdcdbc25ebe437d11c94ab8c5d9dff","tarball":"https://registry.npmjs.org/graphql-client/-/graphql-client-1.0.2.tgz","integrity":"sha512-EVMFkbJCQQp7istgMY0m0WriM++FVrxVk77ym3emtZMpyKVJmdp/8esQsKY9O2ZzDcSS2ADOxYGRu2e3k6mPJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlqOfMzMIk/7OzX3UKFelZMlxDcncmIf41LL4mWI/J4AIgQbqIGnmSjwit/F3LBjpducgFhepSNsERKSIe4oYqsEI="}]},"maintainers":[{"name":"simon.nord","email":"simon@nord.org"}],"directories":{}},"1.0.3":{"name":"graphql-client","version":"1.0.3","description":"Small http client based on the fetch api. Uses isomorphic-fetch for wider support","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nordsimon/graphql-client.git"},"keywords":[],"author":"","license":"ISC","dependencies":{"isomorphic-fetch":"^2.2.1"},"gitHead":"753dd3cc35015fdc5aa27e4c0b94d55aedcffec0","bugs":{"url":"https://github.com/nordsimon/graphql-client/issues"},"homepage":"https://github.com/nordsimon/graphql-client#readme","_id":"graphql-client@1.0.3","_shasum":"5cd159b7b4477dc794d7beaa15712f30b776ac7d","_from":".","_npmVersion":"3.5.0","_nodeVersion":"4.1.1","_npmUser":{"name":"simon.nord","email":"simon@nord.org"},"dist":{"shasum":"5cd159b7b4477dc794d7beaa15712f30b776ac7d","tarball":"https://registry.npmjs.org/graphql-client/-/graphql-client-1.0.3.tgz","integrity":"sha512-B7VMbhNKAX90aFME+4cMIDHH+hGfYzKdv5Fb3Wxp+wDw25Gzhupw8FKTys/7MG2L3J0Z1lHTD0z8qO9KY53W4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7i7AhDI8Smc+cwkedM9X4EYmRicx56jw4yX/871gB9wIhALGABHlD4c0k8K/IAVfxKHEWDF9/hKshGDtPyjs9VDIP"}]},"maintainers":[{"name":"simon.nord","email":"simon@nord.org"}],"directories":{}},"1.0.4":{"name":"graphql-client","version":"1.0.4","description":"Small http client based on the fetch api. Uses isomorphic-fetch for wider support","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nordsimon/graphql-client.git"},"keywords":[],"author":"","license":"ISC","dependencies":{"isomorphic-fetch":"^2.2.1"},"gitHead":"a908bccc6c06e4d015eb52b901adf1313d2b19c0","bugs":{"url":"https://github.com/nordsimon/graphql-client/issues"},"homepage":"https://github.com/nordsimon/graphql-client#readme","_id":"graphql-client@1.0.4","_shasum":"d442ca71a04595a94ecd51e4fffe41e98cef887e","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"nordsimon","email":"simon@nord.org"},"dist":{"shasum":"d442ca71a04595a94ecd51e4fffe41e98cef887e","tarball":"https://registry.npmjs.org/graphql-client/-/graphql-client-1.0.4.tgz","integrity":"sha512-tR+tsSyBM1n54ZHeLG7PUtLWTerQ+0Hc3YH5/fmKdgegiqwUbUhiYsjnOPdl58xRUkOyEcd5iuI35r/j8cSt/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEt0fVKdQuqRbA6xkS4KjwFcH+KFKoJDb9orXGqO6FFCAiEA96dAL3bwvdTvg2x+/8r968cQ92CuyBLlG551bPgOeIQ="}]},"maintainers":[{"name":"simon.nord","email":"simon@nord.org"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/graphql-client-1.0.4.tgz_1464117539825_0.5570900598540902"},"directories":{}},"1.1.0":{"name":"graphql-client","version":"1.1.0","description":"Small http client based on the fetch api. Uses isomorphic-fetch for wider support","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nordsimon/graphql-client.git"},"keywords":[],"author":"","license":"ISC","dependencies":{"isomorphic-fetch":"2.2.1"},"gitHead":"0d36b7484b4f352253e3bc52a50fa1e1f8b38216","bugs":{"url":"https://github.com/nordsimon/graphql-client/issues"},"homepage":"https://github.com/nordsimon/graphql-client#readme","_id":"graphql-client@1.1.0","_shasum":"694187605c6accd4bf32393b9c0727b1f5d0397b","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"nordsimon","email":"simon@nord.org"},"dist":{"shasum":"694187605c6accd4bf32393b9c0727b1f5d0397b","tarball":"https://registry.npmjs.org/graphql-client/-/graphql-client-1.1.0.tgz","integrity":"sha512-L9qKCuLeVYR4pklqSCgzkOnMCy6Z/5oexSnyy+6bhV0yRFvGvy1vZyZN0E7BuUrzzIWokjtYGOfyXhgG8VAx4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCL15K9DdYb2R1KmzkOrlgET4dUvhwbTQUymRbAzBV1GQIgP/XxZE1XMFk/AsQxcfTteX9y2PWJrDumPCxyhvLwtN8="}]},"maintainers":[{"name":"simon.nord","email":"simon@nord.org"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/graphql-client-1.1.0.tgz_1469396695070_0.2597394101321697"},"directories":{}},"2.0.0":{"name":"graphql-client","version":"2.0.0","description":"Small http client based on the fetch api. Uses isomorphic-fetch for wider support","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nordsimon/graphql-client.git"},"keywords":[],"author":"","license":"ISC","dependencies":{"isomorphic-fetch":"^2.2.1"},"gitHead":"2286146f2c78c8ca47c2f3260132ed4aef21f10a","bugs":{"url":"https://github.com/nordsimon/graphql-client/issues"},"homepage":"https://github.com/nordsimon/graphql-client#readme","_id":"graphql-client@2.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"nordsimon","email":"simon@nord.org"},"dist":{"integrity":"sha512-C89fj9FcIVhxbai9qDa2QLrkyKFOI7wc83rp/EhNF+f48R2fMr4Vnq5XrT31+kaZyBhDMz01PfpDoyRTfOP1DQ==","shasum":"870364baba3f7da4a60d60d7a918cc49898ea162","tarball":"https://registry.npmjs.org/graphql-client/-/graphql-client-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEwXA+P5grc66TKF8/o9TCqNtMh/wC3mCDA15kAl87LFAiEAxIUWBglhwX/TOW3IwwWhOdeAzx5HuvpBvUKTeBQuDKw="}]},"maintainers":[{"email":"simon@nord.org","name":"nordsimon"},{"email":"simon@nord.org","name":"simon.nord"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-client-2.0.0.tgz_1504772350758_0.8462218309286982"},"directories":{}},"2.0.1":{"name":"graphql-client","version":"2.0.1","description":"Small http client based on the fetch api. Uses isomorphic-fetch for wider support","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/nordsimon/graphql-client.git"},"keywords":[],"author":"","license":"ISC","dependencies":{"isomorphic-fetch":"^2.2.1"},"gitHead":"7d7b7dcb8a7f3aaec01d48ed0998d5e46689d452","bugs":{"url":"https://github.com/nordsimon/graphql-client/issues"},"homepage":"https://github.com/nordsimon/graphql-client#readme","_id":"graphql-client@2.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"nordsimon","email":"simon@nord.org"},"dist":{"integrity":"sha512-XXdjUD3mwsBDcUB7g+iXQeRt+3gmIbvA/Yx1nE5aq2RQmaJwiH4hEoYw27AW8cDR90pCrPlHJAb1jJq3zUMbZA==","shasum":"d4a85a9fd2b04a0ef732e242250fac132579a4da","tarball":"https://registry.npmjs.org/graphql-client/-/graphql-client-2.0.1.tgz","fileCount":3,"unpackedSize":3169,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHCOLmWv4aZHr9A7BUM5gp8El1z5qq7CNRVsheauKFzlAiEA6q/C2nBymJUmzEKX8k+6wbsWDQl7F2FYv6Jp1Ud/jfo="}]},"maintainers":[{"email":"simon@nord.org","name":"nordsimon"},{"email":"simon@nord.org","name":"simon.nord"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-client_2.0.1_1518713043540_0.6306809759768293"},"_hasShrinkwrap":false}},"readme":"# Simple GraphQL Client\nSmall http client based on the fetch api. Uses isomorphic-fetch for wider support\n\nIf query fails, errors are thrown with messages and query highlight for easy debug\n\n## Install\n```javascript\nnpm install graphql-client -S\n```\n\n## How To\n\nInitialize the client\n\n```javascript\nvar client = require('graphql-client')({\n  url: 'http://your-host/graphql',\n  headers: {\n    Authorization: 'Bearer ' + token\n  }\n})\n```\n\nUse the promise API\n\nWARNING: Make sure the Promise API is polyfilled for older browsers, you can use [es6-promise](https://github.com/jakearchibald/es6-promise)\n\n  ```javascript\n  var variables = {\n    query: \"Search Query\",\n    limit: 100,\n    from: 200\n  }\n\n  client.query(`\n  query search ($query: String, $from: Int, $limit: Int) {\n    search(query: $query, from: $from, limit: $limit) {\n      took,\n      totalHits,\n      hits {\n        name\n      }\n    }\n  }`, variables, function(req, res) {\n    if(res.status === 401) {\n      throw new Error('Not authorized')\n    }\n  })\n  .then(function(body) {\n    console.log(body)\n  })\n  .catch(function(err) {\n    console.log(err.message)\n  })\n  ```\n","maintainers":[{"email":"simon@nord.org","name":"nordsimon"},{"email":"simon@nord.org","name":"simon.nord"}],"time":{"modified":"2022-06-18T13:55:18.568Z","created":"2016-01-18T19:02:13.051Z","1.0.0":"2016-01-18T19:02:13.051Z","1.0.1":"2016-01-18T19:06:11.022Z","1.0.2":"2016-01-19T08:29:05.215Z","1.0.3":"2016-01-19T09:42:02.833Z","1.0.4":"2016-05-24T19:19:01.000Z","1.1.0":"2016-07-24T21:44:57.076Z","2.0.0":"2017-09-07T08:19:11.657Z","2.0.1":"2018-02-15T16:44:04.198Z"},"keywords":[],"license":"ISC","readmeFilename":"README.md","description":"Small http client based on the fetch api. Uses isomorphic-fetch for wider support","homepage":"https://github.com/nordsimon/graphql-client#readme","repository":{"type":"git","url":"git+https://github.com/nordsimon/graphql-client.git"},"bugs":{"url":"https://github.com/nordsimon/graphql-client/issues"},"users":{"leo424y":true,"rolfkoenders":true}}