{"_id":"graphql-disable-introspection","_rev":"6-e96e0bab87f958ddeb8ed06c630130e6","name":"graphql-disable-introspection","description":"Disable introspection in graphql-js with a validation rule","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"graphql-disable-introspection","version":"1.0.0","description":"Disable introspection in graphql-js with a validation rule","main":"index.js","directories":{"doc":"docs","test":"tests"},"scripts":{"test":"mocha test.js"},"repository":{"type":"git","url":"git+https://github.com/helfer/graphql-disable-introspection.git"},"keywords":["GraphQL","Introspection","Node","disable","query","validation","rule"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","bugs":{"url":"https://github.com/helfer/graphql-disable-introspection/issues"},"homepage":"https://github.com/helfer/graphql-disable-introspection#readme","dependencies":{"graphql":"^0.9.2"},"peerDependencies":{"graphql":"^0.9.2"},"devDependencies":{"body-parser":"^1.17.1","chai":"^3.5.0","express":"^4.15.2","graphql-server-express":"^0.6.0","mocha":"^3.2.0","supertest":"^3.0.0","supertest-as-promised":"^4.0.2"},"gitHead":"01f1a4e6f900f6ff4fed7bce28bb9d3218129e24","_id":"graphql-disable-introspection@1.0.0","_shasum":"3a6476c1b29617600e75afa7ba0a2c8a76f4c660","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"helfer","email":"helfer@meteor.com"},"dist":{"shasum":"3a6476c1b29617600e75afa7ba0a2c8a76f4c660","tarball":"https://registry.npmjs.org/graphql-disable-introspection/-/graphql-disable-introspection-1.0.0.tgz","integrity":"sha512-hX7Ht7FUocaxq4GkLOquotaK85krIvyQ/g1f3GD/FdNDa0/nxFV6wMiumwV41J1aAqDfl8BGzBNgUmL8n+2uqA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHaFWAN9v9pHT7DM68tszFDZ/0+HPG6I5WRRbassskxZAiEA/wYuwycuBU+5oStvlvykW4q3RZjjsa5Nz+pvKC4GZik="}]},"maintainers":[{"name":"helfer","email":"helfer@meteor.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/graphql-disable-introspection-1.0.0.tgz_1491793742113_0.500472457613796"}},"1.0.1":{"name":"graphql-disable-introspection","version":"1.0.1","description":"Disable introspection in graphql-js with a validation rule","main":"index.js","directories":{"doc":"docs","test":"tests"},"scripts":{"test":"mocha test.js"},"repository":{"type":"git","url":"git+https://github.com/helfer/graphql-disable-introspection.git"},"keywords":["GraphQL","Introspection","Node","disable","query","validation","rule"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","bugs":{"url":"https://github.com/helfer/graphql-disable-introspection/issues"},"homepage":"https://github.com/helfer/graphql-disable-introspection#readme","dependencies":{"graphql":"^0.9.2"},"peerDependencies":{"graphql":"^0.9.2"},"devDependencies":{"body-parser":"^1.17.1","chai":"^3.5.0","express":"^4.15.2","graphql-server-express":"^0.6.0","mocha":"^3.2.0","supertest":"^3.0.0","supertest-as-promised":"^4.0.2"},"gitHead":"2e31d4ac97475273a3be0d1281773e82e8b611d7","_id":"graphql-disable-introspection@1.0.1","_shasum":"52c7b3b0c80e9f525c5714475a7704f45b91d778","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"helfer","email":"helfer@meteor.com"},"dist":{"shasum":"52c7b3b0c80e9f525c5714475a7704f45b91d778","tarball":"https://registry.npmjs.org/graphql-disable-introspection/-/graphql-disable-introspection-1.0.1.tgz","integrity":"sha512-xasro4rZWm33Cpwp7bVI45IQQ7VRDIfzh5seii6if6aJZGjJU734po56yGdGyVWkYAw08TcjkASdWFG8qCWAkg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDx1Uu5EozTD6PSUarICETpa9E7SJOTT1eDfbo6zyZVrwIhAK2ehnFdvZhaU9ecyAHq4NMpc753tdo0Kb5AEOJPpvp/"}]},"maintainers":[{"name":"helfer","email":"helfer@meteor.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/graphql-disable-introspection-1.0.1.tgz_1491806007463_0.6492928392253816"}},"1.1.0":{"name":"graphql-disable-introspection","version":"1.1.0","description":"Disable introspection in graphql-js with a validation rule","main":"index.js","directories":{"doc":"docs","test":"tests"},"scripts":{"test":"mocha test.js"},"repository":{"type":"git","url":"git+https://github.com/helfer/graphql-disable-introspection.git"},"keywords":["GraphQL","Introspection","Node","disable","query","validation","rule"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","bugs":{"url":"https://github.com/helfer/graphql-disable-introspection/issues"},"homepage":"https://github.com/helfer/graphql-disable-introspection#readme","devDependencies":{"body-parser":"^1.17.1","chai":"^3.5.0","express":"^4.15.2","graphql":"^14.0.0","graphql-server-express":"^0.6.0","mocha":"^3.2.0","supertest":"^3.0.0","supertest-as-promised":"^4.0.2"},"peerDependencies":{"graphql":"^0.9.2 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"gitHead":"5d0ec905aea0893a5682fe8decf36ef85f344bf3","_id":"graphql-disable-introspection@1.1.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"helfer","email":"jonas@helfer.email"},"dist":{"integrity":"sha512-OXCgpr7jQH+4O1QLlyMxS5R/vZY3mGoE5swl1Ghw2A/eMb0yANFW8KadsR5lvXHfsrHjUjeTGzE6pRx6MjffDA==","shasum":"6ac86aaf64e64979435f12e0851f142262509885","tarball":"https://registry.npmjs.org/graphql-disable-introspection/-/graphql-disable-introspection-1.1.0.tgz","fileCount":5,"unpackedSize":6744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCh2CCRA9TVsSAnZWagAA8+AP/3bgJ9MZrXAGvCS9nYoJ\nWQCL9CSvwqgdSDhct5wdh9GWKJQE9cSSaXWVUKW+umX/NQHbYhDvtIHFwBP4\nPy7JqjGrOh98kWvRXAHD88CJ/mbJS16lGrJWhsUjEGAGfXBApGtcq3YcmI7A\nB+MyYqz5Hyp93+KoOn/6JNduq4a73E1YnrpQ6bdus0DvzTdWOYG8tQXaG4BW\nS8BZXTb5rQJqS4CZ16l12oiJPACqRks0iHNEAAs3Vpho5H3yxKac8znHnFg6\n73hBH4zP6r0tHRaQxhd75vmEpYXNyuubh2TDLUlgdoQuy0ykcU2PQUAndvB9\nKEyjCxPeObqOSyhPMinYVuCqWuUQqpmAYp+fh3cgSr5W1xvMY3kTyO11TvaB\nGL5+znzHO8CwgAXIolZylrLnjJ0VsodozvO6EbajkhzZnmzrGSrV74JBzdYm\ny0KJCuxwfCSbgUUeJYFIs5QXk5LeXCVaj4c2DNHazB8w/8cjJ9DhnMx8/08a\nVzAQB+mFzXBXtxiWGD475X0deUf2Z1mNEjqkIP70ghAxJMLde2EKgyITcnYA\n6T8sFk1OtHJPb2rqyrFlK+SsODWuxWKoAJPomPB5AS88Vu6oKLqKd8ofvHLV\n6kdCFrrn2oekxCt+mYWPculdHHrG9ugMVchrug13qxzTx9SkFJSbWRxk0oQU\nWOqW\r\n=4nSM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAKU3gMOfiJPH3V99+hEYHugDu1fS9RRqt3qwFhULnqTAiEAuVw9Ltb02VSrX0G/8YjZHcbH+v1dt3N+sHuRys3IRAU="}]},"maintainers":[{"name":"helfer","email":"helfer@meteor.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-disable-introspection_1.1.0_1544166785819_0.30812532142152693"},"_hasShrinkwrap":false},"1.2.0":{"name":"graphql-disable-introspection","version":"1.2.0","description":"Disable introspection in graphql-js with a validation rule","main":"index.js","directories":{"doc":"docs","test":"tests"},"scripts":{"test":"mocha test.js"},"repository":{"type":"git","url":"git+https://github.com/helfer/graphql-disable-introspection.git"},"keywords":["GraphQL","Introspection","Node","disable","query","validation","rule"],"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"license":"MIT","bugs":{"url":"https://github.com/helfer/graphql-disable-introspection/issues"},"homepage":"https://github.com/helfer/graphql-disable-introspection#readme","devDependencies":{"body-parser":"^1.17.1","chai":"^3.5.0","express":"^4.15.2","graphql":"^15.0.0","graphql-server-express":"^0.6.0","mocha":"^3.2.0","supertest":"^3.0.0","supertest-as-promised":"^4.0.2"},"peerDependencies":{"graphql":"^0.9.2 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"},"gitHead":"b06eaa57965fae8dcf669bd7eb81e73367b1abe6","_id":"graphql-disable-introspection@1.2.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-bRY1LWCOzho/snYsLZ0N2J78zgCDtcFdbdZILxWGi8TifLLYf2bHZ3yw5r1NX42K87AMEOT0d11XScVrcJ+Zig==","shasum":"3813885ea1053c65a7a0090e2cb160388a5575a2","tarball":"https://registry.npmjs.org/graphql-disable-introspection/-/graphql-disable-introspection-1.2.0.tgz","fileCount":5,"unpackedSize":6755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgim9nCRA9TVsSAnZWagAAzccQAIc+2WcDMMNSzc783svd\nIZlvqTIP/m68MeQLILTySpas6gUmMg7o7OV6o95uGroDfZ6yKteKE6f1RAdv\ndVAyhDl9q0STpXcUQrLqt3lt91nmb51fibK6NQAr2oSxHRbzmdbQeaN07Y/I\nlL+o9PM/hLBitjfTrcgE39ZhgqAfkrnM6/q/4nPi5jO9cMmkpt2c4GlFY3BN\n6dNLVn76Qvu3WfxqW0DSnEvX+O5N2qWAodECGVvuKG4FeIclrlL/wJ6VOLAz\n1cARDzKOlUD2twenbbpB785g0vNJDEHaD5vF/oUrK+kNm3QhWSwIveYfJ3Xd\nlHzvcPqxNwEGMPyQi1smC2Qi+BGq8k6Mj5sso5ASsycMxWG9nlUghrxBqgPM\n/B+BkQICKiAigg9iUin0Ji5GeP8uQSOx6wdFgIFmDq4IU45PvCLCDbyt7HDx\nrhowPsm1Yd7aXg6DuS85ERY3CjCTKQr+QcJY6dGXXrfkVAY+CReaTshuA7EE\nuX227a27SblH+26rk7FsAgI/oNUccm6+qOn9JFO9zmnyZWVMFUQbjmsyqGpM\nce5ik9k7SHke81o5z+7hiyyM3rBh2zShW7U/vpyPBDkYrTwebAwPzvGb9CVt\nNrX/9zX4ftD7cZlcbH1phwQ10WpL87BxO4hb/2pDlEBMOa1kaqGEPEkBEw+f\nDSfo\r\n=Nf+r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICHf+csZiOmth14cR6IIdAJI+L3b4g0vJA6qNbYxBE2iAiAdWnxGRUFKBw8TEbZpDq39w04IhfgKnCgk9zfHH5s79A=="}]},"_npmUser":{"name":"helfer","email":"helfer@protonmail.com"},"maintainers":[{"name":"helfer","email":"helfer@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-disable-introspection_1.2.0_1619685223043_0.8557936043955754"},"_hasShrinkwrap":false}},"readme":"# graphql-disable-introspection\nDisable introspection queries in GraphQL with a simple validation rule. Queries that contain `__schema` or `__type` will fail validation with this rule. For example, the following queries will be rejected:\n\n```graphql\nquery {\n  __schema {\n    queryType {\n      name\n    }\n  }\n}\n\nquery {\n  __type(name: \"Query\") {\n    description\n    fields {\n      name\n    }\n  }\n}\n```\n\n## Usage\n\nThe package can be installed from npm\n\n```sh\nnpm install -save graphql-disable-introspection\n```\n\nIt exports a single validation rule which you can pass to your node GraphQL server with the `validationRules` argument. \n\nHere's an example for `graphql-server-express`:\n\n```diff\nimport express from 'express';\nimport bodyParser from 'body-parser';\nimport { graphqlExpress } from 'graphql-server-express';\n+ import NoIntrospection from 'graphql-disable-introspection';\n\nconst myGraphQLSchema = // ... define or import your schema here!\nconst PORT = 3000;\n\nvar app = express();\n\n// bodyParser is needed just for POST.\napp.use('/graphql', bodyParser.json(), graphqlExpress({\n   schema: myGraphQLSchema,\n+  validationRules: [NoIntrospection]\n}));\n\napp.listen(PORT);\n\n```\n\nIf you're using `express-graphql`, it works exactly the same way:\n\n```diff\napp.use('/graphql', graphqlHTTP({\n  schema: MyGraphQLSchema,\n+ validationRules: [NoIntrospection]\n}));\n```\n","maintainers":[{"name":"helfer","email":"helfer@protonmail.com"}],"time":{"modified":"2022-06-18T13:56:18.089Z","created":"2017-04-10T03:09:04.002Z","1.0.0":"2017-04-10T03:09:04.002Z","1.0.1":"2017-04-10T06:33:29.383Z","1.1.0":"2018-12-07T07:13:05.919Z","1.2.0":"2021-04-29T08:33:43.153Z"},"homepage":"https://github.com/helfer/graphql-disable-introspection#readme","keywords":["GraphQL","Introspection","Node","disable","query","validation","rule"],"repository":{"type":"git","url":"git+https://github.com/helfer/graphql-disable-introspection.git"},"author":{"name":"Jonas Helfer","email":"jonas@helfer.email"},"bugs":{"url":"https://github.com/helfer/graphql-disable-introspection/issues"},"license":"MIT","readmeFilename":"README.md"}