{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212094710-d2bdec9e","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212094710-d2bdec9e","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":"d2bdec9e7ef566ab6a85d5283b07fcfbbdddab36","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-20230212094710-d2bdec9e","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-vAYVV6VrlACMv7kNuiJpzGrWO3CSbgYU5tIOqashuDY01eZRp2fDUYeITqhA6kdZccr64aa0pBHQd9554FyROw==","shasum":"8d1b0efad57cf3c7091f1db2221b98f484d4a7c7","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212094710-d2bdec9e.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4SwPrSU6p8o2WOrl7rRdNyVv0SDsDpx9+O2TILN7A2wIgEGZr3MrskPtXxcstD0Mhkoq9eyexUf/OHnZClG6GhkQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6LXCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4Yg/+MZtE9IVf6Uih7/SgUPUes4Flh1KYaN8ioFZ2pZ6QG2josSim\r\nwOxHBaq6i8IkFVy8wsNFQlRY/EVLXUOvqnBC3w/x51ryktYzM8ern5lpQZHb\r\nJrT9/lIZSzRYiiKbm1TuIZJH9pG/6rI8+4unxuJv/tuftnt1GF01zqQiEWfB\r\nG6gIhyB9NYgrIllT35ak/dcplldW1P+UmZQB0BcLzwGFXYmQvvqudofV2jDv\r\nzQlDSKqoKmxt2ppnTZ0XcXxeCvdSCbl/VGszWeiLiM6I5I9uS7eL1EhMnZ5s\r\nAuoEbbb8AAy0v4S9EcHDgli4fQEJvFUnpWeQOMkUh3JcttArF1pIYMHQT83M\r\nlsMuYvBfpFYZL0BalhY6Im3gxO9G3cLFQ2w0LkBP6X0UMmuSjK5DGI4YKiPJ\r\nnhpIXyn9R3lwyhEC0EV16ZBCj1yU5Vo+YqHaGefDbhmzILTiENsLFNvsFtYW\r\nsORUtb1FB85hN7VHjz7u98L4SdjP7YkgqtjaUv36DoZVyk1qP7riKxkF1zfK\r\nRVuoXP7J3ryat1ChmQLK27aeFtKrkDZJqVaG4nRmBa7CuTHzoBfNKTNFcOfO\r\nv/3TV/pwD99lWwssRVRiUJjm3IBaFG1H87vGn7ZKbT2WsgQ6t7EX2AJyY1Yr\r\nJhrEVjkseHF4bGIFBlhwccBAVVb4vAtV3Tk=\r\n=4pi0\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212094710-d2bdec9e.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-20230212094710-d2bdec9e_1676195266638_0.9701130431054457"},"_hasShrinkwrap":false,"publish_time":1676195266851,"_cnpm_publish_time":1676195266851,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}