{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212131612-e0a00919","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212131612-e0a00919","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":"e0a00919489e7b9acd9718d5a8dd6cbe7b1e39c6","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-20230212131612-e0a00919","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-f5TKgbvXU6LNEUWby5+Bjc0UH7uybPcxWa1mIy8Wv237Ift2t0pQBIocB9qAEhpotgLgzKDbhQulmpxbJbFcKQ==","shasum":"50e1595415bac730264655382c46710894e16423","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212131612-e0a00919.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOrH9Zc9eSg27AvdNy/cfvUIl9Zb5eMHpjF4kTu9BrcQIgeH9On4k3qmev1PXTx5p3sN7JxAa4nmaZ5hggpJYnDwA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6ObAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqjWBAAgKH94rcAXRqqCF+xng+SyjHt+cTlEe4HHTrZ1Im7eMqQ8GgL\r\nbBSKU1pISgLKzTVu53v36N4qwa4O+FvZcFNhSuTpEEkSBUv9MaHbE5hX9lIt\r\nn4FeHYB2dM6SR2DZsK4ZFWzitwv/LrUk6K07ygMirHTn9mI1v6Hl19+Nhk/K\r\nlKqbGAbr/iYqeMcYgd799wzQTo9uDSdAcp/hiy6p8pVUM7EnfPYSLTKPnR1W\r\nQ4fEaQFgLTJlFf5cnj7R8PUo1PwJN9zMn4sDlWY5IpM7Yu9h88csXWxfdz2j\r\noAAH4PPD3ILv1D1NLEsBBLBX6FU6wvh4zupjGXzAX3lOGMckrZdUJOTqxNwf\r\nwUAkNaB7nNIchAqj4ZQ7jmG7rnvz8Wlu3cvj0jV/OQ92XHyPoVPupJFGMex1\r\nsSd8TbUgM2vAUAHzuIH/yUI7MsspCgInbsM8ei9+/yY+fVgkM2QgrWvjHL6K\r\nmU6o1sG1iwav8jAfYjbTxtg4Kt5uD7rNH/P/9Ac5J6hM0nkK2H1s0bSNNoOj\r\nuI8tm0CqY+i3eBVbegjM1tInneU3ZvI6dEsooJoJbofWUpgANQmJMiYylRe1\r\ngOgLvc9yokvDEVziR2U++9UtICR+Itu6t3+N/dIU4PGqzBWqtkCyEoJgOy6a\r\nHTk/as01tJ1MpcPT62mpMMiOAYLRr+5AYuM=\r\n=KPwJ\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212131612-e0a00919.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-20230212131612-e0a00919_1676207808778_0.9253110788063035"},"_hasShrinkwrap":false,"publish_time":1676207808949,"_cnpm_publish_time":1676207808949,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}