{"name":"@envelop/disable-introspection","version":"4.0.6-alpha-20230217210809-e3909a01","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230217210809-e3909a01","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":"e3909a01cd4783a06cc73eba9e606dd7299b869c","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-20230217210809-e3909a01","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-JfdBpBECJlsxFBufLdPSVepooD4xqGK5Kbo1qGsCbIH7QA/L3jp7OHI7eQzzBo39VIsBsTsXN9mbUwg2Cdb0Fg==","shasum":"18e89e948a0b09eac0c8a094af92c8043d5158de","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.6-alpha-20230217210809-e3909a01.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9pw7FpsZ245XSeiqhPLO9ZVoPcM1tBmRpdWILBtWPkQIgY9Jd5gx7vz7AZSboQeFCpfFN4OGSf9NVUkCpfMyBVck="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7+zgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpgyw//VZ3FwcH4sCc8eoQgaIS+K2SsC9OmRpZzAkWcefa9VTTHirhC\r\n8yJ1jgf6wx3f301Qa8U7jrwQDIU0I9zYrBrnJSXIHb3WHcjy6B6ocRYXp0Gb\r\nPNRtj6+snGfAt7Gb10OnjhjmWJzuUX6hBbWnn7JWeuhWjxzWq7SmoQ+7I90F\r\nH02Kkvcr+v2z6X5+YCF1885TYfnCX4PPLiktEzsRogaP4+jc2GLfTHgJBEsV\r\nViqsrrQenRXEip9xRvYi8Jp7c1zcfaSc2LBFm8X93jUZCiZ/8pJnk4HKNZgE\r\nj2LEQiHoMtq2WqZ5JmZLaN1gQIF38RWFSfTehD9msDlu6RH6SjJsKFC5/Uh9\r\nmm7M1uuy3wNVNTdJjwEX50LHEmQhCHuA5k9Q/3FECDRXkTXDXbj6t1fhiDzt\r\nMHflKjusYzfvDve/ABRJ8xwUUtEtKDwAGZgFvWHLDTyMBiLa1myV2YjTMaaV\r\nhFySYAzYZdJFMTZ4AgHY8PwL1cOqI/YFnTug5h5bHz5nyjSNLkQmi4ouSOxk\r\nIWxCAZtEy1XEM5TmTx7DSnmR0rv4Dph1TBXjQ9i816Dd9oUUyRKkzrbLVXuK\r\nPMAl3POa6/pZ1DD8lp12vZvIFJjypvUNo2DQ5sIaU+PJhtZjixKyy155279r\r\nngmIFsVpvMp4+VWBWDJmVPZvgZGbKlW7hPQ=\r\n=/o89\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.6-alpha-20230217210809-e3909a01.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-20230217210809-e3909a01_1676668128121_0.6289173755244495"},"_hasShrinkwrap":false,"publish_time":1676668128307,"_cnpm_publish_time":1676668128307,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}