{"name":"@envelop/disable-introspection","version":"4.0.6-alpha-20230217145940-8f851846","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230217145940-8f851846","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":"8f851846b6e44b80e9739c0740559324dc57b44d","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-20230217145940-8f851846","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-mzmLoqoXA3J0cQGR7iwz5lnghl62B7r5j+i89YLFl/xBk7Zxfw4vwWyGTxwlXWtCXAC64m0h+6+YBjdaejMUPg==","shasum":"baa16b91250ce603a630707ccedeca99f993ca77","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.6-alpha-20230217145940-8f851846.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDINX8CfNpWWiwq88416UUmqBwumLL8YBvwky4zejXEBQIgE06iQB1750q7RGc6Pxgq/BRA3BCq+/kjugcaVsvS3fY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj75aNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphHw/6AjkZ6VTvel4oJNNWlYkUF1z17xZdfmxT2aKxObz5R6IuD16O\r\ndTMDemtf4KFlsDm42B1EnClAQIIs/tF6S4tM6I0jODrGm9ttLFVVZmwjKIGX\r\nhWQWR0PHRUjHR3QTHfPSWLd0GbDBJS1JGhjRhrEEqj1RyqU6O8tlMf68z4Dq\r\n8Yw+dCDg9wILHpvu1FzN4VABOzd2Los14Uyxt0CUCWf9USUjm830RE6DnT8O\r\nvvK0W3eQs83sUmnLC3k3UTmqJLVeSOzljuEUOmjsFibK+TvfgcNt09/Dr+C+\r\nbFq1VTz1qqTbgalo/YEfGpamJwHtGRoCo4X2CsIM0eze/tCFAwoKD94TMvod\r\ntjsl47jQkX6MMY20YxSTajIPVbuDypwmwU8ogU0j6ePxLuqSmcOtrjL4352b\r\nWcXZaqeJIKsmV+499VJxkyibMfXooiM1qgK9LyxTj6q1iVzOwxwFuqujjtOy\r\ndLhl4HC7inRXkKg+TL/mPQlnk+q5VA2GnsKS1bglzfn0e3dXhM6JCzpCJWPF\r\nSu9MGJel4sWkBQZo8es4vNTWHfHydFLFwdyy93ARDlds0Fk4tVn4P9DLyOa2\r\nEHXo+0p0iHkQgOfq9DynT5Z0AMfQ4dEfIhzcBW71hqbAqVLMLhi/odfpetQy\r\ndZIgfJ2n4xsIzTEdtzSiC/l6yAvNNuExE/Y=\r\n=md8M\r\n-----END PGP SIGNATURE-----\r\n","size":1566,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.6-alpha-20230217145940-8f851846.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-20230217145940-8f851846_1676646028915_0.10678124196982597"},"_hasShrinkwrap":false,"publish_time":1676646029083,"_cnpm_publish_time":1676646029083,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}