{"name":"@envelop/disable-introspection","version":"5.0.0-alpha-20221013150704-d012237d","sideEffects":false,"peerDependencies":{"@envelop/core":"4.0.0-alpha-20221013150704-d012237d","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":"d012237d591e83df087c81cffeb14570b6780dee","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-20221013150704-d012237d","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-TDaJWAbLIQ5n/+DGxm/7E3L9w8Gu40GG0UEB/qKnu7QJpF5CEAHKHXSEm8nbzkXd+LLuJSsP7J1kqgKDxD1wgw==","shasum":"2e0cd38628b09e865bfd6a51f0a6df564dbe64e3","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-5.0.0-alpha-20221013150704-d012237d.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZmrdhfl5o417vzxhGHJuvv+I87/u2B9TOQTmruc9LUwIhAKCvCrTCYGzQAa8jlyn3aF7sfXIEUTxJ+cJ3ORbV0WDm"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSCnEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpEHg/7BQsleJE9Dggp7GUEiyZP/FiyVMzMy3d7aZC2Hx5lCQYJTqr4\r\nWBUXkmyfpQ9nfbjBwj7Y5VxElWUllULkY97BEBBPG8+Ui1OBHXMkuSvEYM3G\r\n1QeKH48DbGvEIpgEkEXY1Z3m4Wsat5Uo0c3QQGVoMFt0Yj1LbaVivsn/XEO0\r\nxIFfvSGI3TWnfTsUe6yuzHBmRuel5T6YGc8Rf+3p6KQpFQQ5OF/rNl3mHJHD\r\npuLvPGGXbW27gGFmQfyxjaGdupVTnWhqZoGv2BF474jykNLqUF68t0gq9qzb\r\nc7VOMbOGYE+0hQiXst6TAwMps9Mg4GLcSmBj8B5TGsTBB0VpAwT/ecR6PwS3\r\nv3zBtuc8Is4phe5MVk4QWCG66FkWaZR1UhW78X2Cs41TY2DBIx5EFEZ0Bv5V\r\nlvY/cmE1o9e7M9qgmtNMmcyH6lWxPBsntpkw9gN0iqxkLL6ypA7WCcA1Fgx/\r\nXTZ4L2e0ilFBlI31LwzyVvBZ2GA2sqMt+ORhIgTVXC8/biu8QdIIUKVwYuhr\r\n8lPZAQh4+z0zLQlKmWYPoBOHzlC6nY7foHO6tsb8ukH7S/RJMgOAEu/f6sDa\r\nSCXUWEGuzOmTRK4oKXg7zvNyOFvrF4HE0xIYK9v+r+OIPgdLF5c2mrD7EMOh\r\nW91Iyz3ts5eDOJaQU2QyuTe1f9migj35CbI=\r\n=qvOk\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-5.0.0-alpha-20221013150704-d012237d.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-20221013150704-d012237d_1665673668432_0.9483267539500029"},"_hasShrinkwrap":false,"publish_time":1665673668627,"_cnpm_publish_time":1665673668627,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}