{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212031341-8251efaa","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212031341-8251efaa","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":"8251efaa9bc22dae289b6599fd5997434d04bbab","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-20230212031341-8251efaa","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-YPd138G/P7eRT33QFjw2O19xc2/mKicwC45QQ7quO/4Y6uWZEizFuq/+8Rw9DZ3g2SWjGOrdfu2trQk2nsKWRg==","shasum":"b4e30ca07484737aad630a9ef5a9aa7ca79f3ed5","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212031341-8251efaa.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDojaXZR+oHbaQFdZ2kEPHcYfvF/UowuK58JrmwJvL7WgIhANx/ZutUafWQxf5xnlq86sRgiV7je3TkZYcblqfiX4PW"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6FmPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNdg//QwICBPc0miaukAg5iNORgfOwvKnXZH/NMvS9DfYFYZQHAGxc\r\nMfNxDHrgAW+3GkQgBZlGwpCoLBm46qeQkZvTGjuJximqMNEJVSOEqmV3iocs\r\n4+yCGNr95CRPKHrSSPwep0R1kuR/xiGk/VsJfjZJG4eVEHww0UC8iTAEH9OQ\r\n65TavPPe/T1gl/3w7PczfyEBOrhXdJe6FkO6VUn4ronmcVtPr6QaF1Woo3HH\r\nxBeYx8UvZqGXgWf6J5TM2jIZzy3JRYK/iwP2m8cv+2pxlOjbhyNKeyAHUagC\r\nc41ZG6jeOKyFnBIkXxuhQMI6xK0twU5majhOh0L6mzDAibrEZjkoAVdwqvAy\r\n9378G7ZK/ATfJ5yLQ4SHd/2J+AawaoM9A/CB5NPrzJPQ3Ze7BabbjTnR6eeP\r\nNrUuhhb1UE0+hxJJxW92iv16lh7IpzHghfewR0d6M5Cu8B640rp0kv/qNzrM\r\nPJ/rRZ1oliY1dWpV9LVM6tW5VD6puSZX4puQGVdC9fVFt6v4iT+YphCmrtHh\r\n1ofrnvfAQBr23gWU+uGGtMMQVzUZ0xdrEAZEHUhxNKmEHST4c+yA5J9NvizG\r\ntsxjzBrXXT36p6FZ3gSVawYNgpgBNTm+Pesndnh4KUPmxjflMWV342jRMhG5\r\n7LhWXPkPfTZpO4LD5JQz7my6w7g96lSxK0w=\r\n=r3j4\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212031341-8251efaa.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-20230212031341-8251efaa_1676171663212_0.33877286171416343"},"_hasShrinkwrap":false,"publish_time":1676171663385,"_cnpm_publish_time":1676171663385,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}