{"name":"@envelop/disable-introspection","version":"4.0.6-alpha-20230217151854-4c8c0a36","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230217151854-4c8c0a36","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"tslib":"^2.5.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":"4c8c0a363dacad492298e0a0f34a30399519fcd2","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.6-alpha-20230217151854-4c8c0a36","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-CzmiNd4QP/0ZCVfYiUT1hnwA6mEuGIN7KXlKAopk4+ZWvi8nMGTztv3lpWfF86mZg8q/d7tBUGVxHxfE7HGsvA==","shasum":"23470c94de2367f133d977a13a59c910d833b582","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.6-alpha-20230217151854-4c8c0a36.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDypXLFhiJ5fN/Cx4ZUPuPBwsPdUO9Nvzqnk5Z+L3zIsAiA+Ah05AOMY5743QOA3FhCSZLHVlQDdAJUZ+zJNH+FEzQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj75sSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrUwQ/+NCef6TLLUuSD5SlQu3uuDruiCGo0iuF4sB88iVsD9SKt++VW\r\nGcOx+qUrbfdaNgemDRGV/RbH5yL86/7qPSHwoNnkSn89KJyxEUupbRUOUD9u\r\nI97aPve5uptvP8/aGD0XURo2dyh2BHHrN6MUx++Qh1ct6ljNAFyyQ32jzrWV\r\new0ThAOfIJiL53oYbjUEJU1YjVErIuJufW98L9Lb0R8vwrIELrJhU8E1C9fG\r\nH+56auRV2Df6ZQ9neCdCdDTRI7doigWSyTQQLv7eFbxsCtFUhRz0PZXHHy5h\r\nDApyCNOTew9tEA91Yue/AiW5AJ6Qcv/OQ76Wm00jm2B9Z9E7YGwK2DSS4Xr+\r\nQhM6TkZNRiNQg1JxdOBIeN5M6y7ZMQB4h4eypYCm37XIZSJ/i6cjKFfyD2m6\r\nUfuYph7jkq61uGnljT3cfv9nQG3D3e9H1sQ/WxlRXkHhjzBy9x+E0SV1mlqB\r\nO8y8YIHtmcNYrxbpPuRB1kQRBWFu1UVOlcWjZ/OG9omt5uI5cYqpauT31v2E\r\nskJbgl87RnR2MASU/4tYzRUuk/C8o6JbeQv4yjyDAoJJ6li/qe8EHxISB7MH\r\nGKxL7emKn2DSpRaPz9YjKKyyCqI7t8SALBBVBCM8iQMoY3OGT13RmhtO5yZ5\r\nrorH0B4saL46o7OHiXnZqszHK+aYd8AV8cA=\r\n=TrAW\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.6-alpha-20230217151854-4c8c0a36.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.6-alpha-20230217151854-4c8c0a36_1676647186021_0.6737325050452363"},"_hasShrinkwrap":false,"publish_time":1676647186178,"_cnpm_publish_time":1676647186178,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}