{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230211205035-fd359d6e","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211205035-fd359d6e","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":"fd359d6e0c55ce7e3c7bb447337a23787198a1c0","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-20230211205035-fd359d6e","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-aQe6tZEj9ZjCx1F4cPn96BdcNjm4hz/EfZnhoAYfNdO7RRBiUQ2kdhmnQFDmCv6VLp4zxBnwEjP5OZMZGfZNNQ==","shasum":"b6e79c8eefc37a0e98bbd29317fe1eb660ac5470","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230211205035-fd359d6e.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICjhrCql1REUjb9H3gd0hzEqiDmzLuAAmqaSn5JBvvGPAiA80UFs1pkjMvMBE3Ej5WIX1dAakxXXMY3GWiUfNlJvfA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5/+8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBVg/+IkkpRMhWun1dmdYlKzKXtG3kRq7/MW3sAs0sumFnqrl3KK4w\r\nKGAWfihTlt4Fzdf8Xs3CHkYPY7v6ZL+JbndMVQG/oskx76VS06YYGaNK6B04\r\nkWQ2uVpkQC+F5I/+hqHhkJ7wbIANhPQa6rZyhH1hNLNG/tkT37iPHH7B3CBV\r\nDFzmD9r5ylmUXo/a7OLClCX6ON7PrNmy7cCMB73cLscUz45F708ZBoSzzi5Z\r\noesHHTl/ewN4kisWcLwlvWl5OCI6z5HlZeTqMA+3lXaJbD8zpfX1xDY3T3A+\r\nMXtmAEa5OZyDMBxcNet/xYWfVUVXUCMOfj4wPIc1CwWdv/dBIF8fdaF6w42Q\r\nF9/B3D5ayrWcKr9wWaq9zqZJryydk0BO3rwmrSYV/t7g2PYFHNa7RgiaxVoi\r\nvZhTO7w+YkD4NXcqOCiaMXe6BPMe2unG0Qb88IoxsGAC0e80EN7q3u9PXG3M\r\ngjjuoL7z6N3UaE1A3HBgfxQ/hhUrAPHrk6MnW2lxRIjgfIQEBS6yV+T3KAdP\r\nNPdgO1fdVtYx93eIw8QqEeeMjAYRPxPAA+GG++6OTUBpi9CIoGdk4DJwdOZt\r\nzavPv6tHRP24HZygkdADR5L8Zc58ZthqpQ3ieli4bFEC0BnsTtxk4nJBf6lz\r\niZnXHd635OVyobgSxWQAfEYWdgFTDWwPGsQ=\r\n=qhvC\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230211205035-fd359d6e.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-20230211205035-fd359d6e_1676148668484_0.6927484261642585"},"_hasShrinkwrap":false,"publish_time":1676148668628,"_cnpm_publish_time":1676148668628,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}