{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212065252-4b0df10d","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212065252-4b0df10d","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":"4b0df10de79864510131240830282b11d78793d1","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-20230212065252-4b0df10d","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-9e7c3i/rfz2Zi8PQiMyeAU6Ru3wAEuk665bJspSOlQs+Q15ilmuLZUrVt8LvTYuzc08M1wqMcAj1GUndzKj7VA==","shasum":"89678a6caf47c5d1b0cc62709e3b27c40440f124","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212065252-4b0df10d.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEg7+dnctrr3OCduaqGdOiCQc586hCbausPMMPooiNnoAiAWhJsyi3ns/xPjGGDItsa20gP3eoYAP4+mnZ/9Hzdh6g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6IzzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVlA/9FqbqnzgzHoOowiCccsFUgX5mnXhWdbdcnmrRtdKB8B7spNkl\r\nNGDdXUdOxy6Nb8jXK/C9PG/eEbjUM717Auze2HkH0iuvqpmJNnNjoEC64B/5\r\n4JiRwmyRORaq59AauLCnv4iXXn2/SrU4skJxYpv6KYDiiJKb/mfWdEIy5QLR\r\nI6MKOpUZgEIug8lhLvfzB16dP+ypAWEFQGeq8t1AHbDKUg3VKLDCeIk6qDeU\r\nDx2nt30QzkPhk4ivLvDET7IBeFJAvYmTyfhIUKVIjEgweLE3VMeMQYFKwV42\r\n9TaBDOXGDJTBovQ+Ii2URItoU18KlOaa1CqrriVKaa/Ild2LcW9UTjHZdQ1g\r\ndlCjpVOEEq/00MJclJLrc3h3SGXK6iLDiSxstp8Ffx1HFXjSPnnG4lwXGVX7\r\nQ90PbrKf3gZKbRsKiULx1onpWCj9TGGvoGXwwgRaTQ1Wm8MjTPCz4fr5/FTI\r\nS/+Mfwi4i8VUUA4AZsz2lYP3a/ZEKcw9CBhBusYFYd2n0fm7mB/DuvMVPxBV\r\nnM5npsUGSyK/sX5EO3cAt/PLtJuHQDx0naPtr21a0RvTbRA8cOC9dnuQGet+\r\nLWmQksYNlqdjHhg1Cvq+FIVvy4vNmey0FXHhrEwmzchZHcB4mSNmbYL3ebaL\r\nqKHngM8KGo7WvLw7C7tCnnCfwRL7GgxJrjI=\r\n=YijY\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212065252-4b0df10d.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-20230212065252-4b0df10d_1676184819060_0.8056663650557161"},"_hasShrinkwrap":false,"publish_time":1676184819243,"_cnpm_publish_time":1676184819243,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}