{"name":"@envelop/disable-introspection","version":"5.0.0-alpha-20221013115234-94bd1d13","sideEffects":false,"peerDependencies":{"@envelop/core":"4.0.0-alpha-20221013115234-94bd1d13","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, useEngine } from '@envelop/core'\nimport { useDisableIntrospection } from '@envelop/disable-introspection'\n\nconst getEnveloped = envelop({\n  plugins: [useEngine({ parse, validate, 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":"94bd1d132e947aa8376b1ad1886be1238f403966","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@5.0.0-alpha-20221013115234-94bd1d13","_nodeVersion":"18.10.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-1xchC+HuOidlyZz44+HdTyV+BkbZMPS/LaehyitJTF3iwHZcQFKPqL07b/OJbcly2M0fqrPrNK21fpFXIO9iTQ==","shasum":"b7e17b92fc818204359c9ceca2377eb99d22f928","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-5.0.0-alpha-20221013115234-94bd1d13.tgz","fileCount":7,"unpackedSize":4578,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF23Ju/3EdLeMFN+1PYmBrzxYuFamAZj0dPPbk+H4J0iAiAgFS8mdqrtlXjocHKUVDka2Y6yaPUqgvNj8BURZNVeFQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjR/wjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoXoxAApBaP2ZLAkbxJvX0oxQnsuz3RoeiBbOkMvn9NFWKamzDzH0u/\r\n81mpMal+QGtbfonilEVZ975c+AkssbI0c7TTS7ufzHwNSlcFK0jo7RqN6V1o\r\nXOmZgOYBpcpj9O7LCMuQj411C/iM0zsb/Zu2I29psvpMyK2adka7Hoxac5Nz\r\nf/wBU07aDDYOqhQ3aD1P6uDKil2NrT/nlzt4U+bqE70ljQp3HqkQwvLvBSZ8\r\nJkbGbo+q2lCIaaTtEbVMUhFywFb1yYgzygPY7Zjz5cS7vy2r62LDkPktb9gv\r\nQ66zkPW2yUjVI2vv/EiimxxulUZoWV11h6x9d3azInOz0vcxON7pnhs6ElYJ\r\n+QbtVXLP6/0AOlqPRPRfj1gDL7hGdTLcIrWFv7c9DtkA/MxbtT/HmcFvKnB8\r\nKvbczF5ZHIj7d2jl+R2HfhH43lnFwIap/xVgM3LQfTZ09pz+rOMexHOgMO9Z\r\nTgT87+iLD+40o3vOBJ3C64cBYbhuaTUx/NCWhqKs5ol/tenu1iw4rugpVp7e\r\n7Bv/sahlCR8hN9V3/au49g+fno+eLBuXnPcXMdgMFKlhiYz3u+sOWt3LfHFS\r\nGsx17xe3UGXZ0jGrNhPef5GqYFUEwg6h2j3WO/2rs0XlzubKgz1OPpawlnpr\r\nW/YZ0cD3AJx1nS3LLwXCbSDEG0VhqlFFKMs=\r\n=FLVI\r\n-----END PGP SIGNATURE-----\r\n","size":1555,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-5.0.0-alpha-20221013115234-94bd1d13.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_5.0.0-alpha-20221013115234-94bd1d13_1665661986850_0.6250863254259336"},"_hasShrinkwrap":false,"publish_time":1665661986999,"_cnpm_publish_time":1665661986999,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}