{"name":"@envelop/disable-introspection","version":"4.0.6-alpha-20230217163505-f5f5a2de","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230217163505-f5f5a2de","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":"f5f5a2de4d1d2e9eb01f291b962cc9f21e0fa224","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-20230217163505-f5f5a2de","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-PzxTpMDJkG90Yff06SA4huntY54+BRGg1HWJ8XzXDKLxFQumu9AiFcDYX+RT7RxNM9sQpdhQYRcBFKtoj+i2mg==","shasum":"cefe9325b8b2d13c303e2c53075d3b2e0ad4d1aa","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.6-alpha-20230217163505-f5f5a2de.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGiPObXOpv6QBZFULGZvJUZw47G/bN3dEMD6aucbPQDDAiBNnEYa3giyuRIEzTxqmw3QmgN+eXWafQP2FkFmtIMvLg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj76zsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrobRAAoHwpBhdLQxv4tkdUDQggU7JAY7VI0mGQqf1crc0W/o5RLsrc\r\n/L2bfM26RbL2lMPf/8xlbPLJ3V5ODp1uc+g8j5AIK2mjl1WICOxZ1y4tWiV+\r\nwUIUkBF/Ag/HY2ovRa+w2+Erp3d1q2kl6mC/axK87IGRn4/YVvyp7FH2OqUD\r\nWtmCfAyMO1cMl7kDJzPpK4KWLCF/huBfwxixHacj/z6JLOAgK1Cd3sh3WM/1\r\nSVV9dnhUwUAi1+3HLmJe9HwUe494fNTe1gR9YBUbY4FcmElbRdB3c2M2a/NF\r\nDKzqp18Ko97N5bIbok4aC+vbrYkRv0aMEev55sezN51FJXf/NztRsvel43De\r\nSeaW7HrBRVDwXCwHrJbEyaX038yUAmaQLe6T5XsIm7AIaOu3mH+1nsJfu4EZ\r\nfEPdNv0oGfccH2PnhIBtA6HJntsmM7SYrgd28LD1GMvJJw70zv4EOlGuSeh3\r\nEt4sUPoykbvkbrG6foHK9kUHSg/nIbgNPx3B+5h8gP4lcaTOB/ZumV/fvRc/\r\nDve0DMUlwWTw8YfSfIci40OWp190xXD+ZAHf3E7DYGA1VezKY9VoEucfNHFX\r\ngmSB2i/F9bmvIr5ZCZjGT/qkk+db567t6bcIvBR/10lZwBC9I7PtEnMfAwvL\r\nrQ0hPspx417fgJzhbNX4Dhlyi9iQ/wW+56w=\r\n=blS/\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.6-alpha-20230217163505-f5f5a2de.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-20230217163505-f5f5a2de_1676651756055_0.20751434330078888"},"_hasShrinkwrap":false,"publish_time":1676651756249,"_cnpm_publish_time":1676651756249,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}