{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212021636-0cbe9a34","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212021636-0cbe9a34","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":"0cbe9a342810e611a4b829cc4a72bca39d4849f3","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-20230212021636-0cbe9a34","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-9FNmMf2F1IZ3WeKJFlylJpe+TUtKo8gqeCFFBiRlKa+6QKx+oXsbo9Ga7ue6+9nfL+lCpA2kru52rQCF/LZLLQ==","shasum":"8e841ef3381ac2d25f255c9cb2d751b0465755f4","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212021636-0cbe9a34.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVchmCgfyFQ88oVqBBCa9Wl0D555b/bj749ri3DFYCYgIgfnOBHJL7PhCtjm/ZKDr8bFMsDmJ2aI9GmUMauiAl9gI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6EwzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpc2xAAkEHQwaW1t5FKPOk9uW8G1Qfwklz/cZXv4z0IwUxXiq2Sgc8v\r\nFbPFE+DjdzfPqef0Zr8XGKkaWOdHUCfs4rHxvfmLDmq/t1lkCf7cr7bHi7DB\r\nZfonEnyKa5VeHiHJno0CkrJK4rVNal10kb9niY6F6lack1gyR4YFEkPmsG7M\r\nhF6Z3MJpA3dKQLV/3C7pYw2RLfloGnd5DSlzWI2A0ZsRPz9Ft3SNO5jyXvVu\r\nqqmlCzYJk9kEPT0lmqPOAovAw2Sf20dtZZU0FP8jauTkjl4RMi7YXW+/6mmx\r\neFm3BB3NestLzszBHoJnvaXXI2jyl5gRlXgLsHHhzisYiXNhhUgJHC5Aq0SX\r\nrABYTXVROmW4XhtnW/jNLQxhMzS7edeptvP4opAlGegMjnjg+7mx9tlk5yU2\r\nkWNRYvrzNfoAbedgn9oem3VSsjUlMIjbZhDvsUMQaQWLATT/y3eXRc+YZtnW\r\nLacCPe1b77dPpY2YggfmxRCyGFWervQ+YT1VjNqkCZsEl+M0+hMnDzgj+vQI\r\nNWgqprxLc2/I3d3SvNvnTq9zV8RkKnYwa1oOYMcUyY+LugExjKKgS1iz9WJe\r\nU5hU64OkefCNWZzWwIL6j/RkWqOWFuskbj2fMHkBlw7LHCWJNp+6NJk3ljfZ\r\ndfXvBGcn1fegfJWjcKusYGFoGWA73c96EN0=\r\n=3c6b\r\n-----END PGP SIGNATURE-----\r\n","size":1563,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212021636-0cbe9a34.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-20230212021636-0cbe9a34_1676168243098_0.034038907795872264"},"_hasShrinkwrap":false,"publish_time":1676168243279,"_cnpm_publish_time":1676168243279,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}