{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212100930-0756179a","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212100930-0756179a","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":"0756179a0a56dc15c1cfe24449c7a0acfa62d6ab","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-20230212100930-0756179a","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-DUPTapQfJXDQr6N4xWd6sNoJ6t0E5bZLfq4Z0r5YVFNXOycvZGd8RbtAnOBxO2Qe0Eibufc3Pf+5pVNFL5f8DA==","shasum":"832619c91c7bd5bb73746ff44f2089d53b3a4730","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212100930-0756179a.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBxxyKfCoYld8vjoQ2736iqfotoGbYY3+90g5GPtimI2AiAmv3QgcJBtku/pVR1z/0Iu68aa0fF0pcsMmw9ze30zBA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6Lr+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofCw/+LOXn0tPeEvzbSVOAuTN8ep04g6XexYlcEwDwc+z/9ujPyvnB\r\nwHsIf6EzxOLE7BhKfr7khx5xMILl3e2O7vzt/srA6bNbVwCqktU4FvZkxDws\r\nQCihW8iUL/AVRCEEAN5JrrS05dJ34RUuwn089f/Izq8NNN23SMwqwAozJYCs\r\nK8CWDE9FTtyEpmxhHHpqsljmrUrXS5y50O14F1ML+kof4O3O4qyw6qfpZXlN\r\njKI96FnKFPlw/a7uEbSG21P5aUlSVGmPiuu32QIlGW+sRB/OyPaICqdKG0Mw\r\n9Jgxwak2AsIxkLvNHGi3gAPytF2rUSN5KlGh/87jP7wzwFS7w/ATtX1y4+fD\r\ngL8FYyt1Bm8FC99FvC9LWTQs+IdPGuH7/lTi0spyOA3HOWGhjiCH6f+2OT8Z\r\nEA1i0fuSCSqy9qVnrCfVvHStN6MAyRyBb0Qb+FmFkCQovtmwp4j1Qqqatj8O\r\n/059pLKn7z2CNS0yBLFIT0pi9rW8jYlktPXJbzQGh0JCIWwGVZHS9PPXMiex\r\ngvWz1xFf3xbxJBUqpDwiVOSDmzJanKz+SGq4baS9vXpR+qR85xH5CjzF81Mk\r\nxnvIUCVIf4QYSShEECjxePoPR/QT89l3ZaWyku0i0rgnYNarSWDi9tcgeqaQ\r\nHRUNihXfbVfSpNpsRpgemmQOlrBnsq8wlys=\r\n=Nt2D\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212100930-0756179a.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-20230212100930-0756179a_1676196605840_0.35541029256654744"},"_hasShrinkwrap":false,"publish_time":1676196605990,"_cnpm_publish_time":1676196605990,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}