{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212003313-68efa0dd","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212003313-68efa0dd","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":"68efa0dd909ee4cd8e369195c4d8ba49b0e8431e","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-20230212003313-68efa0dd","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-1xdeIJCu7kLV4uFltYqTjwx6cIaUgsqbdum2ExcaVeAKT2z3eGoV5ew3nGkQvqwlP7BVHBrfghfmR/mihlJtbQ==","shasum":"59f315af92b9d75de3472568a3ff86635afe3328","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212003313-68efa0dd.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAWcqsqjjRCLa0bnnNh1asMhrGvLPi2iykqDaOsY6K8EAiEA37LRlnQTZII3OJ/3h8j2VL4iTWhFA3Xxm7XyoMFNRG0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6DP1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSjA//QYLBnORF5ticOqa3AJAT5XtfzmBQPPLf00pvX3swUfg6RNfY\r\nVYjCP/Udgvho2LVy3ynu6fjFhUCbf+jJukqynXk72Y78cyaCWkqa99h0iqF5\r\nexXAtObMamm3FC3P9eWF1p2AyYoPCVO3nX3wBJHidRoPoFjJNqEmWmZSF55t\r\nezHLqWPXlsPbjzPqBRXsm05jIkQVdP/oL4CqxhXg5SvJ1INnOr7gw0ya4arN\r\n6NJsJhuEuZv82sOFLpl+kZ2ilp6Ib43dEQpnJvgL4JwN2h5W5sfQeZ3+agGv\r\nafZwPMTMPZkY/dOfbp3l+3YYbqu6ncOHd4SF39y6JZhS9Vj7e0kpgxpiym8L\r\nxnQ3QrlI5JMuFvuU4x3QctFKj9hfT2sVozKznCSQUfkJ60CTncmX+v23881P\r\nmzylIIIRLsojmRhNKHpwilQNGM5x1jZHuFZPpF1dzA/LtaTDGNg+7G0eQBiM\r\nW1QmhcthqIntM1nI0if+W2ZihchKmN8oDa09T/R7TLYQB+8qqk/pvgdRlUfq\r\n2lGQ9cOcBH8PomaIAK1N3h/HBHQBcro/twznA7fOouSlrts/+KNZXN3sGFLs\r\nbLjvQJUhfN1WhKVtkGHQ37yNucf+lISnG03cc8JsOzNewYdBsWcHd8eS5qHY\r\nNrY0sI47vpVN9e1igJ1JA97egDLJl075xNU=\r\n=6/+E\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212003313-68efa0dd.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-20230212003313-68efa0dd_1676162037743_0.7968046108757503"},"_hasShrinkwrap":false,"publish_time":1676162037941,"_cnpm_publish_time":1676162037941,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}