{"name":"@envelop/disable-introspection","version":"4.0.0-alpha-20220915131758-a1d7aa94","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.0-alpha-20220915131758-a1d7aa94","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, execute, subscribe } from 'graphql'\nimport { envelop } from '@envelop/core'\nimport { useDisableIntrospection } from '@envelop/disable-introspection'\n\nconst getEnveloped = envelop({\n  parse,\n  validate,\n  execute,\n  subscribe,\n  plugins: [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":"a1d7aa9425412f21da640fa549382e115f1705f7","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.0-alpha-20220915131758-a1d7aa94","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-SrmVwu7h90E27Nku+gW4I78CTrKmbdSJH4hTy4Pmy4kQOJaDtQETkNrWNStKBud0w0+yp6Ej3rBBDwmIiOv34g==","shasum":"162b87e978cc8ac998b60f852e2e0260cc7d07f6","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.0-alpha-20220915131758-a1d7aa94.tgz","fileCount":7,"unpackedSize":4560,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpEeeqSrkos4f4v1tdBuWeEu/doJholjBThbySUOmeBAiBSK7Z40TwUAuVj9nPVJOHyyL778pfSd+AiRYRV5L5Haw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIyYoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrPUxAAkyghB8Tg5j3rTf/wcSwphwIp20q2UZ4KBg0skhOsn43mFyba\r\nTDSOWNL20rLjx6Es4HSZcmW1iFSZFYa3EQK4bgN545htZ067ifi/KnPr5+mZ\r\nR/bHyjVl0gGsvcIuAec946srY4LXY+eDHYWp+JlHJLvB+HQiRPGvQgRW7HCN\r\nSqRvdpuZRxcYxqMJiD96KXySPy0hZTnrF7SKv0K+/Cilx1e87MHbrPPKZqIi\r\nQJzA+q0Aa0z60GA41HGGTvrQJt8QxHXVuG/MoToXurYHKmMdc1KLhZ3vSlpR\r\nbv+FEgxbxluXmkGDbnR8VK56zRBwtw9cRVvhSPYi0oqFqJY3mSS0a4GtKVmf\r\n3scLjyz/V0bYbkOnDjwBeuQxWYSIbjhbUTbeE1ctVpVKyVFIq/me1qKvF8/e\r\nrR8T+YE8WWqPUzwYxi3w0emP1l6cNk1Xo4IlkyyOISNM1M/G9lSW1zUhkS6T\r\nn1lShpFclPusi4dMho14hyf+ChDk7Ipst/mTu7wk7wLQLMOamohmSh6Eg6XC\r\nR66DBPdr3OI7MM8ksvjqQBH8MmoqCOubnZelLGbszPbl5oIjE/3zvfKEFl9P\r\n3Zk5TGAGyqWsdxW4zu6NYZ0CyQ1m9PD25X7HMcQRXVSqCihNQCa6P+Py8gaA\r\n2Ub0SPHDcg5RRQIdPZvcvDf4j9xCPHpw/V4=\r\n=wQBr\r\n-----END PGP SIGNATURE-----\r\n","size":1559,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.0-alpha-20220915131758-a1d7aa94.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.0-alpha-20220915131758-a1d7aa94_1663247912739_0.4353580720783614"},"_hasShrinkwrap":false,"publish_time":1663247912930,"_cnpm_publish_time":1663247912930,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}