{"name":"@envelop/disable-introspection","version":"4.0.6-alpha-20230218023709-572b77fd","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230218023709-572b77fd","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"tslib":"^2.5.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":"572b77fd33108f38e9453b4cc63662a3a1f66c61","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.6-alpha-20230218023709-572b77fd","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-uLZdNVezAdXx65heW47Wbe4TJln7gR0ZSi8i2ri9NB0GE94v64e/2mZRXUKDd94fg/zb4xC2NoTQd61ut9cmxQ==","shasum":"e7edcc134361b0b83ddcd2db73b21bf8516ecf30","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.6-alpha-20230218023709-572b77fd.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkUrKEWmmTYheUT7k76XzeWVQvo6T6qWyRHDSovbtlFgIhAP++tlbcF9GNCIOqCXUJxkTWrjxgeGUxtBxQwnS+Gyk/"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8DoEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4bA//d6d2/mGxOShMgye3CJBr3H3MQXdsfj9ZKLCP7TWlfEkbd15+\r\nu4CSS+Go7m7r++m7cEiSDn9fUvN8NH30fN9IHxUpujFGbAP1l1xoXUBIf0B6\r\nBUmaHgFt/ZaEjgr/B9Pc07v3QcEAMeyQDgYcM+E61y6rX7eaNTYbV9cT0Jyw\r\nwvhBD5EwRp8Nz+jyxL3cLOkjcSBQrCMTNi3inDLkOIXVEvbNxWPBvtZX7Zns\r\nx19cbOQ8lOIxPuFwK/82gJBtzy2Vf+jO36uqyMQX71UjK7P1gp24zBoB8ZiJ\r\n/JCscGny09RZhQGlcktEcUUVDkgBciFEi2l3IW4XDFbSpPMAl+fQh4UrHKIu\r\nR5593AS71Ok+1m5/YiFNcPSGF13w56e5rJHoxDH4L62KZ4XxptQwfb9GgTF5\r\n+wVd80vOdoQKF7lTj709kZ4qiLW3jTC/k00Ra40aZW4+9Bbc18Ryt6+9FGm+\r\nHdKUzOAnVFWzqQZzr8B3rws1IdHWtLs3y8minBx3Nmwt5wr50t5UbtKZd/om\r\nj3bMZ33rPwwEapBkmahK+0GfuK8uboka2CKH71W4Xt1CaioOQFWKyC/Pe74Y\r\ndsDY3DOosbouTS5EMcsRp30CrluFWUUqU4o88dQjDVbav2DPZGllqOsg06ab\r\niKGioT59cE/2ilARA8/liAzT30drs0kKJgs=\r\n=knk1\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.6-alpha-20230218023709-572b77fd.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.6-alpha-20230218023709-572b77fd_1676687876336_0.8081713697454607"},"_hasShrinkwrap":false,"publish_time":1676687876535,"_cnpm_publish_time":1676687876535,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}