{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212055619-1739f1ba","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212055619-1739f1ba","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":"1739f1ba2ee8568fc7b41f8deea8edf5d3ff0eb4","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-20230212055619-1739f1ba","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-DU9S5+FxpnwzQgqc26CmK0b9sV4VZWrQ5oA+4ZruS5x0x5J4jWoCpBuQz3V4/QyHgF2V6qUZMFFVGv6QfpPsRA==","shasum":"4b05873e76037ad476b9a4f6c52dd39ad0f8d8bd","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212055619-1739f1ba.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLkHW71sVdocqA6zk2M1r/dPaKKfH3EFhJrv9f1CSIvwIgUbpuDT2vvlCmOukeZDqdRf8zjZKyHdZlO8fvnNXUbBY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6H+lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqD+A/+KMk0kbTSj8H8yAH2lTXMvcJbb59ohUAr6tPrITo108ejp+eE\r\nKJdgd7h4z7QXhy5O3iAvL5zAwxiFnwDX8nVa1SzcnazJhaS3+kjvq3sa+m+v\r\nUeOU66CrHbOsmk3ePu1yEhGeYlh0eede1scGSxOsy64d9eWYq7iwm7JgRkeM\r\nSzgAMn34S0quXQ/loujyi+YAemr0QxLYnsHJQyFb4n3H5Tv+YZ1Xdw32/FX1\r\nohiL3y4zAKD99/kMnEVezm9WTMnfXVepbZLhnJqPeBQ3nNgoQIwnJbd5IqXL\r\nR5wxZyhf5NajP+g8gP4ft/L1Hv4clfC2Ez4RlF6gP/1VsLBg9tVKrZOogckW\r\nInePSsPHs5pfjMo5XeE8U0e0e2/X7AYLnQsbo3J/HVVZzsfOWV9enma4Dd2S\r\n+zWckutvnnf1S8089KkYGUqEr7xUhthA+jS7JDf5/JlzX2EEXiwjXFB0RI1b\r\nIqorf8Mai5CleDUrVBdnv93nqnBjQUja+gZPNgvqxMKhhSbUc+NQP+3rNoHG\r\nh1FndDfqb/GY4LfmClV3tPnsSL/02tZlmilIU1MM0AMvNU/aTgPggCZNKQts\r\nALN+EKMk8fWIVjzIBTVRM5zCZiJKp6pGzgKbUST2VojabnBzeSjNXw3UbOi7\r\nkUAjjbucLBD8ba+LKOwEvg7er+HQFFHocLE=\r\n=VZM9\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212055619-1739f1ba.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-20230212055619-1739f1ba_1676181413643_0.5731826355497938"},"_hasShrinkwrap":false,"publish_time":1676181413836,"_cnpm_publish_time":1676181413836,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}