{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212054425-f19efb65","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212054425-f19efb65","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":"f19efb658abfc6e1d4a894cf961d8f9387c4a9de","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-20230212054425-f19efb65","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-4Wl0vRr5TwyXAdIkRap31CM6m2FDRJaiHl994ViLBzaQgWe9w+12vcl5GUT0Fx6BKi8C1Y5DA9wQTIO2l72R9Q==","shasum":"f4dc6b95603b01efb0ccb9c1347f63cd9f130b58","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212054425-f19efb65.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDMPCq0l0Q+IqN/VgDngwJK6YHRtg4Dg1LNudy/aZwPeAiBXFA96Tiri3TwjGRi2Gczsc3aqJEFaAmRxGBfn4I1j9A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6HzdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpdOw//QnrJPhsgKFhY1rgfFlkw906R4hiUnc+VYbmke0VfOwqdNZpF\r\nKiJORnjLGd/QH4K//LdA/X8wWpWTQW1IfVjpq016FvfEtuPF7l8dX93nuiIi\r\nap2Jv7cAifoBiUbR1GWGputMt3qtkcnA480zBAtraKus9AgUWMiUF3+atClv\r\nftUl9Zo3cxkPCH5kHbujsIGySI8TKKsTa/IU5PEYlzttX5iuoMiZU2v6W0il\r\nKuBtyegUKXSN1D+yhQnAXEqMo2xhipRVCT4q0A2W7WGG6V+YUKKtUqiS/XXE\r\nl/ZCBE66TA3WzHZO4rRDATPMqZvY9l2ICV+VJcn4PKDRoiv6gJUoENrhHlk2\r\n8W29bGR16FBgkyl+0pcql4/RUadtl81M7Fyg7M9O/Kg0EWGtlCrkAWqds3Bf\r\na7YIwj5puk1lQ3/4T7kteNnC4MWXipwLj3scslDvFH/wcR1A0vZagAWYqGPF\r\n4T7GxJOVn4qkr/in/jGWD+xL1vCNemqC6p3Eq8N44Q/L3pcjIoG7ZB/hcfaK\r\nsL6N1Kr8igAQHcy2fNckMHf0J4Q2cqSlJvtzxB7g8tcIE4JYJ18SOpGt0nKz\r\nlrHt1rtga9keLiEwt/3u6cR7Pc7YW3jvPnyAzZFbrGPi0YhpyPElqwvGlgPs\r\ntTZBh0YK56tbCf5p5bRfcV0TnJUqR6ET0Pc=\r\n=3KK0\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212054425-f19efb65.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-20230212054425-f19efb65_1676180701703_0.4335881378500033"},"_hasShrinkwrap":false,"publish_time":1676180701896,"_cnpm_publish_time":1676180701896,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}