{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230211135022-281f864f","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211135022-281f864f","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"tslib":"^2.4.0"},"repository":{"type":"git","url":"git+https://github.com/n1ru4l/envelop.git","directory":"packages/plugins/disable-introspection"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./*":{"require":{"types":"./typings/*.d.cts","default":"./cjs/*.js"},"import":{"types":"./typings/*.d.ts","default":"./esm/*.js"},"default":{"types":"./typings/*.d.ts","default":"./esm/*.js"}},"./package.json":"./package.json"},"readme":"## `@envelop/disable-introspection`\n\nThis plugin injects the `NoSchemaIntrospectionCustomRule` validation rule exported from the `graphql` module to the validation phase for disabling introspection.\n\n## Getting Started\n\n```\nyarn add @envelop/disable-introspection\n```\n\n## Usage Example\n\n```ts\nimport { parse, validate, specifiedRules, execute, subscribe } from 'graphql'\nimport { envelop, useEngine } from '@envelop/core'\nimport { useDisableIntrospection } from '@envelop/disable-introspection'\n\nconst getEnveloped = envelop({\n  plugins: [useEngine({ parse, validate, specifiedRules, execute, subscribe }), useDisableIntrospection()]\n})\n```\n\n## Optional configuration\n\nThe plugin optionally accepts a configuration object:\n\n```\n{\n  disableIf?: ({context, params}) => boolean\n}\n```\n\n- `disableIf`: A function that allow you to evaluate the need to disable introspection, based on the incoming operation. If introspection needs to be disabled/enabled based on the dynamic parameter (GraphQL operation, or, incoming request/headers), use this function to determine when introspection needs to be disabled. Return true for disabling the introspection for the incoming operation, or false to allow introspection.\n","readmeFilename":"README.md","gitHead":"281f864f5e2a3db98acde120b14e595a25198744","description":"This plugin injects the `NoSchemaIntrospectionCustomRule` validation rule exported from the `graphql` module to the validation phase for disabling introspection.","bugs":{"url":"https://github.com/n1ru4l/envelop/issues"},"homepage":"https://github.com/n1ru4l/envelop#readme","_id":"@envelop/disable-introspection@4.0.5-alpha-20230211135022-281f864f","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-FZEIMM78SyLKf1QN//VrTmh1cWR2kwiDFt2JM+0/29i4x53gfMDbV9aAkyvYUgOxHQTXAKz99ZzJ0tCjS0s0yg==","shasum":"356a33a99bf1f50e56d0647a47536c85431a25f4","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230211135022-281f864f.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5pX5p7y4ltVucPvyaDjEFXGty6omPmM4akyemrSHJKwIgQhqgA9tqSLPdPlcDw0wZ2GrwwglW3s8ZiBvf4cXlg3E="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj551OACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+8RAAgk5COapnnlKZMGzKMwO0Gx1BuVkJMgy41edDE0mlrmrw70R2\r\nuD97pDyyE2xjJvG5TolrPy20I3cVytZpDj0CbkaXC5ZiZw0cn6O1a0tAnhaU\r\nhCL8t4zwrn4E3JgMZAut+KfGJHKAwvC0I1DjjVI6YhBq7k7bRXIrm77pt5xE\r\nokKIyE5akQoVhQVJlqcVKQEHkh/Z7NApJcAAnmvrOx+3NgVZ4tkG/TYayuTl\r\nidx9JUAAf+9yvpzgRRJ/53mN2VHwzFOGCXV4lH2HoEO6NCDra1WtG0i6tt6f\r\nBFDIbVw7T8BiZQ+T5NcuIvSb20b9b9waSweCcrtPG3USzGh+oSPFAMgoTsmv\r\n6dtmUgLUVwSdAVBBXVYsPU42RXIYzDSg+A//1cUlglmj3ydQOvP7ZNJcwX2r\r\nniumD0VmiOOpz5BacmAd+G3/b7Q4+mrjh9KVMNZDn9eERsJ2crLv9nM1Lfvw\r\nuN2GN6Pr2Hhaj0UpKWdB0K2iWwbIr/yo9ZP+J0ctGUUGGa95EZzRXy6tB1we\r\nedHMW0DRNPeSU4+LNb5jFl0QdSqRq7+rzM0+tBJWF7YbvhEuUiv0TD0xOYVE\r\nB2q3HAEvPykJVvtl6JQkUgUiFMPUzdHswvWQdNkywtbgJVt39xdpPujKNucz\r\nGi9Mg2g0yhqSZpAy5ithrGl8guZ9dd6xGqw=\r\n=DVm7\r\n-----END PGP SIGNATURE-----\r\n","size":1566,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230211135022-281f864f.tgz"},"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/disable-introspection_4.0.5-alpha-20230211135022-281f864f_1676123469816_0.30674825297311936"},"_hasShrinkwrap":false,"publish_time":1676123469976,"_cnpm_publish_time":1676123469976,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}