{"name":"@envelop/disable-introspection","version":"4.0.6-alpha-20230217220447-07a667cf","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230217220447-07a667cf","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":"07a667cfca710f997538c6e8cf37b3ec41ebc234","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-20230217220447-07a667cf","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-Tf/GNoVR1KMF1iiQNYfnb1fOZy7/jHB4etxhX4hdkT7syAgQe7CB4GyX9uvXa7N9Nro0BN3sRomphYkCa/f39w==","shasum":"04edea3f8a5c0b3963775fecd1ff60ac6fc6418d","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.6-alpha-20230217220447-07a667cf.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7Sl7dtwtTukSEe3nhCyIivFLGKKufHkLErsEH6fTzTAiEAoy7j6rVzpW/cXFFr9gKYSVoi4NgmF7w+7/0BsyZQzPk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7/oyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOihAAkuo7kE6QgqjPLpExLSyUnGzvAF/jg3d0MeC3m8oehcE5yv9e\r\nCIgjoVohhCX27bkZ5aVAJ5fNt5U/oW3wuCrrSD5bAdimCkmGOtKuB/vZiYTv\r\nPeXDMy6Pjm3XDWtrYU6cfV7BBlC23gqXODnGuF0d7nbG6av1FSnriCpTYAVZ\r\nCgS8Gp0ExfHtmzkIA3chycSY4PYHG2y5C837G9gwxM755MPRs12xv/1mcMLb\r\nTZd8KKqOb6hUwlM3yYwEdrdCH3WpG42u0qfAsvVSMz3YkMczfI8dp49MvqCQ\r\nT5dUFYrXyvFgumOaR0mY/AcyH7trFRiu8BzilSR6Rn2lDM3j7np6+jUBRjL+\r\nHi25TOPr+d/EAoCSAfatpe+Y6p4DUYSdygmKbYMjWt3nfjlXx96nJLbbKnYy\r\nd8IjVAKGF6ty478X7LJpi+zWocWIRJX5o8ejJYOdufLooqv7wmSAtOzBEoIL\r\n/Z871HXMBkowtlrSHhx6mzyiDeAEN7Sqwf3JZx0E957ybFRM/bKxs0VjwsCn\r\nHBkJjXFY4tn0PYhWT+tw/66SW49rm4K6Ubng7eMma4yExA+h8DHY9FchljTo\r\nHN++1ANzATuV9gHklxceNiaz0RVtDSEKFLrJX9DYeJ/3tHisKACY+hOZj9m+\r\nr9edIF1aye7Etbh1PWQnFzCEwiakhWQ378k=\r\n=aNdl\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.6-alpha-20230217220447-07a667cf.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-20230217220447-07a667cf_1676671538493_0.5209785206908091"},"_hasShrinkwrap":false,"publish_time":1676671538645,"_cnpm_publish_time":1676671538645,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}