{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230211132115-0cdda41d","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211132115-0cdda41d","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":"0cdda41d62fe889d2b0eccb8c481447179a77741","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-20230211132115-0cdda41d","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-M5ZhOY7YnR1pa+ahJy6c1DarDIT6+z9kACc3ivKqC+YOG/bczIulFonVou2U04vYBPom/hRCXhS5NpLCsppMUA==","shasum":"6a04606585ceb197e33fb3c5b065b24ecfc89e27","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230211132115-0cdda41d.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw7vo++2X0lgWwESFYaL08an0rT/bpJOox/Y9GrfiYQwIhAJOH2UytDuoVRIwrj91+D0wBCYw3+n2KYci/sECeONiV"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj55Z4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUdw//bVI+4TW+azDbD3Hpa6pDZMePgrbqYpDzjrf6VUfCqaaJ9PoK\r\nIlaVwnxj5EQqESaSEXf+unoD/+NTYrcp6I8OQZuCNZapx6G9+Ml+zk/sy2JB\r\nRRaxr9ala0qx6h1TJJUH6TK1arm6NlMuzXH3mGLHzsQ4s5pxcDXOnoJyKb3d\r\n6BYXVXshQ7xalm5ncqC/HbMkHt9KHEmH1HfyfoGhP7DOIczyZCxlVY3s5wWe\r\nTNFaFgTqV/DNGVVlug/qPfBF3lbFbetjJKzFuK56aXUv5HvSi7lqWs+fkLnI\r\nptwfL2DU1stNu5glXZ/xjnDMFqs8/pUZeUt4DNL0oHMqlE32CBbDNw8nE8nX\r\nuJWT3OJffRq6p67vUzvi8XdhVxkaGMdR2oEfe8P0ljnRzmyJ5khq4UopJ2yl\r\njPRp4n+vICm4NDac2C+ezbmKbZtDrBCaCw7HtKeOLoFV8RNwSiiwZhIEGXrA\r\nQOiR3evBWY4gqShkRllchqYSLcHPdkEw0UlLjig/l/nHqaHzRiA/mtmTALDA\r\nY60Bp50fgQGS0XLcfAXop/jXkxL/lHyXjy2Nc+fY+t4xeHEbQ8e51osOAIP0\r\nAwIOemkR73NRYTqyjVUbgPtcDUCoZDZSREwp6o0mZqLylyTr+q9TDi/lnnXG\r\nkvGI2x2UAr5E1yD5x43Kg2MuFDrGnVJ2D7E=\r\n=q86S\r\n-----END PGP SIGNATURE-----\r\n","size":1563,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230211132115-0cdda41d.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-20230211132115-0cdda41d_1676121720503_0.3395609434258722"},"_hasShrinkwrap":false,"publish_time":1676121720694,"_cnpm_publish_time":1676121720694,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}