{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230211234234-cd61f930","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211234234-cd61f930","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":"cd61f930f31f224c1314f001997444f2e4b8526a","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-20230211234234-cd61f930","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-0yrnWNwddQoWmcMK6A4PVoOr4Qhzc9Fi2OWaTeNf43sxcvqE3/YYd5YOOWkP4oaLpQC2MxZjfmOPmKj3bHGgcw==","shasum":"cb98d1552cec0e9314fe030cfa8fb8784a898f33","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230211234234-cd61f930.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAJovhKFyeiX3NMlXK5oNIK5bZ7xyREwzmZLhVtkEwhVAiBSa614YA1ogZLU91zHtD/k/hEhESfoaUCEgZk8VLGlyg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6CgMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo81g//SDjq1nUfB4rGursxKaMQHBqwkrxU5q4qCJrXBQjcZPaBKJmj\r\n90DdZLrA/Mf8icXE6MCb3jJuCFa+9RwyLaiumuHQ+NKJQTsU7TMBYnCyovdR\r\nn3cUnvJkMH0YzCa8r1effKDvt66DQXOdq6bRxDUQuPH00j/znHsDI00GEsrj\r\n5t55gtJ0PkkOF/iOwSVC546srO2sdxLw9trNvs4wlhoPotQDILnI1MoOcYt5\r\nhHLH3t59nI70i6cm+bKm9ya5TAiyJVF5MeTSSwC4zgZ6/HYeWRzIyE49qAy6\r\nBGoDB7EpG7cGVmanx5YWaB+WGNbdeWW1FmD8sKq8eWA8UOn1G/P+0RlwIW89\r\nKMgSX8kngPLr00RhcE9i8P0LTCtN8BBojB0K+d7C4j2gtIjzvVPh18C7jcuz\r\nQQb/zcID+URmn74OhDdKijex2+a6lMOzsJvVdvfQPpGbyajQX8w9xtcHdWT3\r\nlnd62mZEJ1ot3W2CPcPyM2f/t8Om4uXiEH+npyx3URk3W30AU6dKcnS5oePE\r\nvWbWwVLgDsdv3aBwGPAnACbod73zVC31LjYKh0WwHN5co8s9O0gHcM8VW14z\r\n+lkjrIs3qCorlGIWj8XGC1JvbdRTtGoUWEsHBhH0wIEkIMo2EO7U+Tmv3ANm\r\nrWjKhW5TjiNbXU239U4xDN9MftTtcX+49O4=\r\n=xw0S\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230211234234-cd61f930.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-20230211234234-cd61f930_1676158988637_0.6867051311112111"},"_hasShrinkwrap":false,"publish_time":1676158988826,"_cnpm_publish_time":1676158988826,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}