{"_id":"@bam.tech/koa-graphiql","_rev":"56-ce6cc561204ecea4ed6d33bcba15da44","name":"@bam.tech/koa-graphiql","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.0":{"name":"@bam.tech/koa-graphiql","version":"1.1.0","keywords":["koa","middleware","graphql","graphiql"],"author":{"name":"James Ide"},"license":"MIT","_id":"@bam.tech/koa-graphiql@1.1.0","maintainers":[{"name":"laurerc","email":"laurerc@bam.tech"}],"homepage":"https://github.com/exponentjs/koa-graphiql#readme","bugs":{"url":"https://github.com/exponentjs/koa-graphiql/issues"},"dist":{"shasum":"8ee82dc5bfe5d10445d75468abf1c52a3d995bd2","tarball":"https://registry.npmjs.org/@bam.tech/koa-graphiql/-/koa-graphiql-1.1.0.tgz","integrity":"sha512-HNcB1AsirfWRu61+nDQBNbUK2Djf0ZgLu0zXk4ZWhGYBD7zwI8ZD+sf8BXxTsNXM7s+MICrpGPjN7A5dY1ZRvQ==","signatures":[{"sig":"MEYCIQDC0xXqgt9g2IhQco7h42TvyhTa8IIYefvVH0+IqybGnwIhAKKVsh0GB1MX3EX+AKqQcVT/pwvSN0dKYGdvfDXxIX49","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/middleware.js","files":["lib"],"engines":{"node":">=4"},"gitHead":"89ba655df6c4ee14e3b0aba66159d670c59f908e","scripts":{"build":"babel -d lib src"},"_npmUser":{"name":"laurerc","email":"laurerc@bam.tech"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/exponentjs/koa-graphiql.git","type":"git"},"_npmVersion":"5.3.0","description":"Koa middleware to display GraphiQL","directories":{},"_nodeVersion":"8.4.0","devDependencies":{"babel-core":"^6.2.1","babel-preset-stage-3":"^6.1.18","babel-plugin-syntax-flow":"^6.1.18","babel-plugin-transform-flow-strip-types":"^6.1.18","babel-plugin-transform-es2015-modules-commonjs":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/koa-graphiql-1.1.0.tgz_1504792017591_0.3510476923547685","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@bam.tech/koa-graphiql","version":"1.1.1","keywords":["koa","middleware","graphql","graphiql"],"author":{"name":"James Ide"},"license":"MIT","_id":"@bam.tech/koa-graphiql@1.1.1","maintainers":[{"name":"laurerc","email":"laurerc@bam.tech"},{"name":"minishlink","email":"lagrange.louis@gmail.com"},{"name":"maximes","email":"maxime.sraiki@gmail.com"},{"name":"yannl","email":"yleflour@gmail.com"},{"name":"lechinoix","email":"nicolas.ngomai@gmail.com"},{"name":"tychota","email":"tychot@bam.tech"},{"name":"almouro","email":"alexandrem@bamlab.fr"}],"homepage":"https://github.com/exponentjs/koa-graphiql#readme","bugs":{"url":"https://github.com/exponentjs/koa-graphiql/issues"},"dist":{"shasum":"43af7b3790cfee5a73fa03d167a8dc347b38a8bb","tarball":"https://registry.npmjs.org/@bam.tech/koa-graphiql/-/koa-graphiql-1.1.1.tgz","integrity":"sha512-DB/b9b7uKuEvSRrEXbhs28DoK0W1qfOxGFr8TYyw7+/w3hUyMdJBHe4pv2lBZJknfuILR9m7rOLbhaCpvfg2mw==","signatures":[{"sig":"MEUCIQDqAIc3W1HQpCmqokQE5mKd7rahJQ81R9QyLCNiG6XHKgIgdmQ3riCZJQwLRsA/m3443/lM1NBPHbNpFB0pTu9+0jk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/middleware.js","files":["lib"],"engines":{"node":">=4"},"gitHead":"bedc6d96d1e77d2a016457da8c9cba302e4d1297","scripts":{"build":"babel -d lib src"},"_npmUser":{"name":"laurerc","email":"laurerc@bam.tech"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/exponentjs/koa-graphiql.git","type":"git"},"_npmVersion":"5.3.0","description":"Koa middleware to display GraphiQL","directories":{},"_nodeVersion":"8.4.0","dependencies":{},"devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.2.1","babel-preset-stage-3":"^6.1.18","babel-plugin-syntax-flow":"^6.1.18","babel-plugin-transform-flow-strip-types":"^6.1.18","babel-plugin-transform-es2015-modules-commonjs":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/koa-graphiql-1.1.1.tgz_1504792233710_0.4398858945351094","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-09-07T13:46:58.502Z","modified":"2026-04-14T19:10:26.133Z","1.1.0":"2017-09-07T13:46:58.502Z","1.1.1":"2017-09-07T13:50:34.483Z"},"bugs":{"url":"https://github.com/exponentjs/koa-graphiql/issues"},"author":{"name":"James Ide"},"license":"MIT","homepage":"https://github.com/exponentjs/koa-graphiql#readme","keywords":["koa","middleware","graphql","graphiql"],"repository":{"url":"git+https://github.com/exponentjs/koa-graphiql.git","type":"git"},"description":"Koa middleware to display GraphiQL","maintainers":[{"email":"tychot@bam.tech","name":"tychota"},{"email":"antoine.thibierge@theodo.com","name":"antoinethib"},{"email":"marekk@bamlab.fr","name":"marekkalnik"},{"email":"yangl@bam.tech","name":"laurence923"},{"email":"remil@bam.tech","name":"remilry"},{"email":"paulb@bam.tech","name":"p0labrd"},{"email":"alexisd@bam.tech","name":"alexisd"},{"email":"thomasre@bam.tech","name":"thomasre"},{"email":"npm@victor.pm","name":"vicprz"},{"email":"pierr.poupin@laposte.net","name":"pierpo"},{"email":"pierrez@bam.tech","name":"pierrezimmermann"},{"email":"hugok@bam.tech","name":"hugok"},{"email":"zyad.alalgui@theodo.com","name":"al.zyad"},{"email":"nicolas.descamps@theodo.com","name":"nicodeck44"},{"email":"julien.izzillo@theodo.com","name":"julienizz"},{"email":"julienc@bam.tech","name":"julienc6"},{"email":"eliott.gandiolle@theodo.com","name":"eliottgdl"}],"readme":"# koa-graphiql\n\nKoa middleware to display [GraphiQL](https://github.com/graphql/graphiql). Designed for Koa 2.\n\n## Usage\n\n```sh\nnpm i --save koa-graphiql\n```\n\nAdd it to your Koa app. You may want to use router middleware if your app serves more than GraphiQL.\n\n```js\nimport graphiql from 'koa-graphiql';\n\nrouter.get('/graphiql', graphiql(async (ctx) => {\n  return {\n    // String of the base URL of the GraphQL endpoint\n    url: '/graphql',\n\n    // String to display in the query panel\n    query: 'query Demo($token: String) { viewer(token: $token) { id } }',\n\n    // Object used to populate the \"variables\" panel\n    variables: {\n      token: 'eyJhbGciOiJIUzI1NiJ9.YWNjb3VudFtpZGVd.-w3FiHaq5jIFIOzHErgdEQGvXXG6wClBUDFDVgwUyx8'\n    },\n\n    // Object to display in the result panel\n    result: {\n      data: {\n        viewer: { id: 'account[ide]' }\n      }\n    },\n  };\n}));\n```\n\nTypically, you will want to populate the `query`, `variables`, and `result` fields from data in the Koa context, such as the query parameters or request body. `koa-graphiql` will do this for you by default.\n","readmeFilename":"README.md"}