{"name":"@envelop/disable-introspection","version":"5.0.0-alpha-20221013152202-6bb6b034","sideEffects":false,"peerDependencies":{"@envelop/core":"4.0.0-alpha-20221013152202-6bb6b034","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":"6bb6b034618e63a8eb15a80e568a08b390c08d80","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@5.0.0-alpha-20221013152202-6bb6b034","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-x0ZMplc8MGHmBbXHpvlraPf878vbbyNagOJu/FsMo21GY4GCO9CevdaB2Wl+mOgZRGhBxUvN17n8q8GfoLb2bA==","shasum":"6a31b3e8bbe4c17cd00f9c7a85dd4b02d1627ba1","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-5.0.0-alpha-20221013152202-6bb6b034.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbJkfYSJkHaJ+ocy7ZZK1B8dUMLPKrI/umyNK/V8U1qwIgbFJWy1C/diflPE3czbDwSB4AQEQHBF+1Ce0YpnINVWk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSC05ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDNw/+PcA6BJwzQDAviKvbWwYV0tA2Ww3gbzbWwJUv96YSIlaF3hT0\r\n14sDMD5ng/QMLzW6xArIxasJbB1DGdh/ki0M4pl5UClkitn05zr8HdHV68N4\r\nnw/MWRFcWrKufMWX5a51NSQl21GRbhgixZTDNco2OJ6q+HRCkPr12eBdrsZ9\r\nE9m1S7baWUhQDYOk2SeulJu1v6IqYKO5Sak/qWR5X/zMcwUjXesAti6Rkr8S\r\nBXc3ydidmalhGGFK4VL68XXTAzGrN95w58D+WgaZb18hHOaRqZL7VcEICtPQ\r\n1gtKXFJ7dxfG4+1dE+Fv1TBoBvyfUO1HmZukKv+aP2Qn7FBN1RdIY7NsOAuw\r\nouvZDTTQE9tdCSU8/bmF4M3uANZZdg2U1QoCdG0znp/tVFnWvTXLndcnUkVk\r\nQu3uwYUBYbRe2DYDwfp2Zl5eIAMnxng4GZQDmVkDCs7sXJTla0tc0Z5OWjOU\r\nWticEWrE/Y232UnG53y8uXyZ5/Z1STNUxsqacFlaewVnwgPDx/3Y/M2aTEcN\r\nipRwe6uLXU3+8QkS1nz5LTW6JKmOG6fEIdyiiSY+hIozimGy0xtKpFRCx3W4\r\np9+kCb5c0Cj9cJPmqUQWDWKTOr6xXxP+YS37SECWubfuwYABiaqsUikk0x/q\r\nYVZio6DSTu7n0TZzrIASX3sCJjiIL4YqKS0=\r\n=B5kT\r\n-----END PGP SIGNATURE-----\r\n","size":1563,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-5.0.0-alpha-20221013152202-6bb6b034.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_5.0.0-alpha-20221013152202-6bb6b034_1665674553252_0.8933855098523917"},"_hasShrinkwrap":false,"publish_time":1665674553372,"_cnpm_publish_time":1665674553372,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}