{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230211174944-ff9784ac","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211174944-ff9784ac","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":"ff9784ace5f86f042b3ed6e89ccd0d2c54bb27d7","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-20230211174944-ff9784ac","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-U3MQPdqASRB4q0vGySnJ3jd0uS3wlynEzh9KYh+q1SakjNLa5XEFXKsBmCc7WZJVGMVsAD62e8Gjh8AnXWN78Q==","shasum":"0cbc410dec5fa279648a72b48c93a17d8e4217b3","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230211174944-ff9784ac.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIoMjo1Z1fxGWtb6qFJG3zupMvXaKQu1Jo7oC4U26VtgIhANMLixa0Ijtm0M9xclJRvJuTJY14keG5BWh0Fpif9q5i"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj59VaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmojqg/7BeJ+5R5EnNzc+G0RsHc+79iCm2fZ9qOIV3ULFQDYBFT1d2TM\r\nNcbUSCIdgVrqgq5P+r5MnJYR3UxUprz7KwvfQMr3GfCo36gfcsZpwTMhnl/4\r\nmy57cz4VkaVsfU3YJ7MoOV19DdHlknMfR19H1Fi9K5EmpIwpIr6XVVwdSoK4\r\nL+jGgqkYXE3nRyTn0AioMvPRQ3+IfWgaZwWNNf3u/QDz92uLmv3Ky5W1SikJ\r\nciIzY+skJNpODYqTk7cfLk8G1DCLLrdlFrhANzxYVAvxiFlKV6OgJiuzQH7P\r\nC/nMhxeceBh+cdtpr5H4kcPQva67S3rjTs/JyNVJl5/RcZRuofPETt3VKRLn\r\nwdfCu/cjxsXwpMmvifchIF1c0oczeoesStPBfjxlUYpR61p6kmFgGssSv++F\r\n5TyzZMhfmQiYelppHlaW0M/eYLrujzW9hHyZ7Ckb5cKYKQJ7Gj9Y5rP6IMMh\r\nNYBzZb64DmHvThSIOG7XWTsNfFsu9cygdeBPheUfDT+UXtN7TdXs7lzRvC9w\r\npaavhW80Yx+PUn8B8C7N2HsMoMt1JPltfBVc/EOeRiNlnLp0tVYXeP2RwHRv\r\nK1B4LLCBaANHIwPHT62vLEJ36tdpa9sLwx1jiZ6xD/6k3RiMQeUhFFWOr5eQ\r\nkIyQmuzP6HpsVn/BzXS4HDnN6qMeYYLAHQY=\r\n=rXYS\r\n-----END PGP SIGNATURE-----\r\n","size":1566,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230211174944-ff9784ac.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-20230211174944-ff9784ac_1676137818420_0.5213199832528053"},"_hasShrinkwrap":false,"publish_time":1676137818551,"_cnpm_publish_time":1676137818551,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}