{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212012437-c1aee57e","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212012437-c1aee57e","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":"c1aee57e35cd4fc3549c3de12c00fafe0e245c11","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-20230212012437-c1aee57e","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-FBCoc3AKbllcHfxwj084HTfqpdeq9FaCGI9KbOLn68SvtClxuw8/rl/R9d7XWXKz6f12ZoZmbecybHTSk66Ldw==","shasum":"8e01ccde5925f8af2a090216e90e574cceb8b69b","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212012437-c1aee57e.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEXNT04qPNksiJLPqpQtq5yK5QoW2a9namIacOwR8qkAiBML8KVIW1ljGZwGQIoSJUo7672+l+3qeAOxgGreOD+uA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6D/5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwcQ//Q0NB3Oe5NCp5zlsaayPS1RMQOLgoRZ6OSZm0MV/+TYIae789\r\nO0CLbBlyFV60WJLZrkex88YUkLpERFJTHV1DMmnvC209L7Ey0ApUHw90cm5m\r\nRQXOLB4t940ZlWdu0CZafM46xWsLr5F7M4Wqo+pzjqctV/T29gsumAvkO/u8\r\n3sSL1JWOn2g2GS7hJykLrtCEJG7M57PvfDjkGJHOLeJT0utZQLvh2cEgmXpO\r\nojOqYjCiMQ7XzqtV8WxLG6YeXGtirn3R4w/hv8btw8A7CqzQJxkCIkvAvhpy\r\n1EOmraGLwP2pbctWWpcMembH/FyLwEv15sY9vnza2SN/6LwDH6kSJrMY/t/1\r\nEs/1F8X4F1NC9FIGJJsM2eP7yAlVqayY5i6r7L0DJ2zopdeUwg0WHOGjm6Os\r\n0JbKbnkr3NfEcs1aVxDasTA5JsiEa9mQrawGpm0b4D1aLldDV8xi9nFfejJD\r\n+/Gf4M/lC7KhM8eE1tiyBc9R/1T9rG5dozKpdh84hIzLhwDYfnf8nNSkzCGI\r\nMczHdr0TxSU8LNQRxxYcgbuK7qcIhsT9wFa/hNcnBT8fs2vGsaxffiLdthJC\r\n0xXdZpXtjT2BdAxyEDPGAQnET0hR72u6VWG/6uG5ZfCtM60oxkIYkOnNeySD\r\nSwn22WbRsNKgB2+eFudi/agpka3ZMR5X7P0=\r\n=XzSQ\r\n-----END PGP SIGNATURE-----\r\n","size":1563,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212012437-c1aee57e.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-20230212012437-c1aee57e_1676165113756_0.4849644291116548"},"_hasShrinkwrap":false,"publish_time":1676165113924,"_cnpm_publish_time":1676165113924,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}