{"name":"@envelop/disable-introspection","version":"4.0.6-alpha-20230218032305-c18bdb2d","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230218032305-c18bdb2d","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":"c18bdb2d663f366c1c18611a01575bd150dae78d","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-20230218032305-c18bdb2d","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-MV18cJEr/COxgmw5Zorxd92zHsL9U4hi5nOSKrOU/eDu7SztJE19tR+gL6a3nhDB1Tfvp9QqaCDSxaQDL1W+Ow==","shasum":"31d20b74d902d2f42b227ece243e0e75ef6d5828","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.6-alpha-20230218032305-c18bdb2d.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFfIhukPPt89PE3F89SbmlWMDF+U95YdlGKJB7I1T4Z0AiEAi5G1i7Hx7UYgV6Vpv4fNGcXQzzQsjDHLJlMWSW0sbKA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8ETAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo15Q/+OMPvUkS4EFnIaVkgFv7C8N74lIiJ1Xdi0Kbdq/kp2GbveO37\r\n7Crf4EesMsdUUyX6z8sMs97Ez/yh//d9dkiKSOM3+l/bYFRx09DnkK/W6hJI\r\nHdeh5fTYt4qDrdldeApC4K+2u/4LIuBx4rO1GjA9YecR7bW+Lgkli/+Z9jrm\r\npEjNLkZwed/nssnsvxkitjFaWPfIH9zyHpLewPJCANWgALs6SCnlh7xyO8Aa\r\nUeZ0ud5aG22T6AJGrpynLyaxNqEhDGuOHqtjS61SJ7kGHxBpCzWQBgUSSwqE\r\nR+LKnz3rd5cbUde5zk8n/5YaRKBHvnDFTcVUMCzh/jDwJaomLzb4U0OV07dw\r\nXGySP+J4J1pFGxbz+mHZHqpAtDA0f7zWZ5gkasrgiSOHerUa/Hl/D37oqFcR\r\nx+JX6JgF1PdYbaVaZ5SKBJqFhYeizHIvJyafxfwOETXpSqTqubSNGR2xyr2+\r\na2C+BiIa5tZ9/BMpSndQFbcRnELsX3fkB4gii+eQTj+cPerdJK6fSxNevAM0\r\nwfkUEknYs8lXHhlQ1XBCGOy5RG+4gAl2pEWS8YLY+Lseby2VaIZWCKG6r7Xb\r\n3e5Z8ZKhh+Lr43C/FW/FA560y2CaduR7hAlPOr1grK/rv67BA9pHn/erGp+5\r\nImXLDNp83ihyZ+r3bP5V37qEFAJm0nCXOvs=\r\n=+vNs\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.6-alpha-20230218032305-c18bdb2d.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-20230218032305-c18bdb2d_1676690624586_0.6813582697231062"},"_hasShrinkwrap":false,"publish_time":1676690624777,"_cnpm_publish_time":1676690624777,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}