{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212074131-e5433b11","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212074131-e5433b11","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":"e5433b11e62d3dcb4cd2267cc5ed61e1bcb8a6dc","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-20230212074131-e5433b11","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-GBaFHVh/LduKu+eYf9CgAabP/2S6CP7Nq7+NiyKlBEECIjP7xAsx0eTwHNec2j5r4vWifx+0nBvf4TINR471Zw==","shasum":"c2148b9a4d47f66dcb26e0b26362b7d0f26fc9cc","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212074131-e5433b11.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0HzcuHeCE3vvqp3MV7S+wGnKS8pSFDdHr8YgvRNNQ5AiByD08Wknzq+ZVcrcOzqHwxkQi8QGVb/z6XxACNVuendQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6JhZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqszw/+KYsQXzVVBsZdoFlElta53lwWzVKpquqZAfsBc2EgbjGw0gI3\r\nvVzEEOnvi56Pjphp8hR+5u8sNA6A4mNIEOOw7bEwJuAiEJ9jhZNXmlRfHw58\r\nnoimiGIaRRXDlS55P1KtRagdwNnsgo6CipU+jOoz+hloVtexD3x0cogkv22G\r\ncHqf2cfBb2D2+CsawS4dOBTmUz0g75QubHM4Ql5d+1DoSZ3DR+CEzg1PwFIP\r\n/q1MBDeP18HtiW5kwS1J7m5U9/KDWYSTjlOrPRU7I29Uz+9nE8+lRls5HGmF\r\nvPeE8Hc9PDi0F5N6M+u/CwomU50fRm9QuU7wcT+OTueOQF7f6M/jas0ngM+l\r\ngieKs0s9sJTHFI5IWXGpOjkttmtXrhKjYREt4pFnHGwFVpxSykoKAb4q6Dyg\r\nsWiq2PYBf48/y+FE6xBaIvtZaxVKoYNn3XbJVwHxzEQopY9P9Sj7ut3Sx3W5\r\n0wuFedEY4Mz6IlffjVhiC3gF21N9ie9qpERQ7kTQrT36xYl5cYmqodsvaxQE\r\nPLN4vPLlznRq+0T+oeBgjriVVMnX5pHtiZby2KKWEK2d63wdi4JWj9r7YFtG\r\nFYWP9VRKJX/uyzgCtZRlYw65ryrtyW7WHacaGhvu9E23wrbEatLVM8IhxArO\r\ncBIh9jWa1d/A1BA9rUupzg9sqKJTURiWavQ=\r\n=z5is\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212074131-e5433b11.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-20230212074131-e5433b11_1676187737765_0.24281818593590354"},"_hasShrinkwrap":false,"publish_time":1676187737934,"_cnpm_publish_time":1676187737934,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}