{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230214031837-4620033d","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230214031837-4620033d","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":"4620033d215081b4ab12bfb12218dd13d43c7b08","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-20230214031837-4620033d","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-gCojqMIaqNzpcs5coZKvLtyLYHI5Nu8Zxcj5s0q+MYvdLQBfqw9g3RMBmwEaf6kbAQW2pftg1QsTpkR0TiODRg==","shasum":"8ae4f5c9bf46bb20a4443e2621fe5673d622b5b3","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230214031837-4620033d.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGb86BVw8iZvgq/Ec+ssBVmigXdRaq98uEw8X9lC+tlSAiBNHSyOmxsRKD3DlNt7hG9MsDAjltBrMo/olMYo62/zMQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6v2zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrE/g/+LcOfTuRIhCVA1Fu10hw/ZBmxTyZiUAxLk/epi2eb0MLsl2v7\r\nB2KpwqFXFrdp4tgqIPaw3sIVWg9ZDWKbxUbhJDap0YXKvq6CYa0bkBNwd+Ur\r\ny4CyBiLttyjimjOQLAGfBNADVXraY/0A3TvzNJHn8/t6RWYJtPLUI6SbNku4\r\nK7fTrhaHFa39d/dvNBZ3OwE9XgXPN17FmznY1vx+Lu5v9jVejKRy7tJOjlzc\r\n9USuRIrllpOFgoLmDCMyaYR6dqzANwvInhgLRsKXrE98LeGmOrTZIPcnxeGV\r\n7hoRZLLHoxZTCjl3WYcOvN60EWFk5nF0YX9MfhKyskGmjgghQWJnQTJstdcC\r\nwrHvE7Dnnji1CHgHTIyCz+U0cufcdFfD1C8XIiJUkcSZmybHgTIk02RFcuIG\r\ni1r51FSoAiB1SvnMCtkZa3Dhra7Td/nOY2hEyiz6x70l20JEvZkjWmxGh8z1\r\nMewJNmux75bc2x4MR4bzW0GgV1HYZECY7AIwmtfe+WmJOUgP9QV0iVVockq/\r\nn9i7VrB/GeFJFBUzA0mcsbgSJDwvKcURCKXXH0cfwofabEGV7iNgmV30RRO8\r\njur0ovlITU0NLXSbWD2KA8xzJwz7vy9930EU8glnQYzL2TVKbn0OxmpTJCWG\r\ndQbsUH7b0hHPpDLBGBrPHXjY0XZ20aXxHkA=\r\n=enF7\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230214031837-4620033d.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-20230214031837-4620033d_1676344755761_0.23904538223646576"},"_hasShrinkwrap":false,"publish_time":1676344755943,"_cnpm_publish_time":1676344755943,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}