{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212131405-c01007a1","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212131405-c01007a1","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":"c01007a1d8627d65e8ab92de195503c3d4a159b2","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-20230212131405-c01007a1","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-q8AE2Jet9VvG4JUb/JkCdYw5YpLqQXjucrxaC4OnuubWA7wBp026zw+jauggZKn88HrE9cChIZMCxD86+Wtx6w==","shasum":"210000b2f40f42a9bad94f56c24484dedd707e6a","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212131405-c01007a1.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGzaF0SQMVHA0cWuuF2nsRjSeuEH8W3M0PpTF0GUBoCZAiEA7ixpy9vUbRGzEQY/fR7Zhbb8HwEz4BX2hM/2MxfEeeM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6OZKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYIQ//T+XclCjSyMiylUm8h0vKo21TPNnZysw5UeuHxnjD+B0kFnE3\r\nDbpRfXb8+irYb+wd75YiRAGV4yPwYmTJE/MarBQ0jjC2syh00RsJFZSgHqRl\r\nIDcrmoKrFYeQw28hVh5fgEI0+gb7KyLeMzhp7BMZUifhBPGfhGlzbQMbjpnb\r\nUfghlR7YFwkk3HFfYuorG2uon2C26Eieg7id8UjDRYz3h2ksF/739cN4RKdO\r\n93C5a4Zal/IvifocphXnSioY5VDSg7V4JKymCSPKGDO9F+sIBA5vlqSEg/fC\r\nvZIwG7K9RZ6jYsH/ClzeYEr53kdRrQLcuWGiJZ9ZVcX3U2+MMs5ZsiStCpv0\r\nIQCoyVWQBgSClpHjMi5UzlMfAsPTkid7H7r4xX94WzqMxJj/NOHLxhV5XHa7\r\nDB1gSBiT2c7j8pKPOGaom+KIU2XiayEOP4hK216/A0e3HiI0J2qqZYr0FkkG\r\nEf5CD+++P5Gh54IEKDbFtVdZ03eEoZVZNAusz9GZdFqc056pSOqOmwfsLNp1\r\njkd+HXPuLHeNeRTgK8A0ny1xrovolHRPXv/CUnSLh/4QPWORtFwlYw3ZW/IA\r\nB/OGzlGt1tKE6sRFSpk3/W2t0OoGlk9+i3lr4xBdQ8aq5zpZhpmb9c+bXC9r\r\nKuwVmo9Kz8ySLFCCeoKKeh9VhFLkHnXhxLc=\r\n=gFEg\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212131405-c01007a1.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-20230212131405-c01007a1_1676207690720_0.6309962924090669"},"_hasShrinkwrap":false,"publish_time":1676207690889,"_cnpm_publish_time":1676207690889,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}