{"name":"@envelop/disable-introspection","version":"5.0.2-alpha-20230915095429-a92ff55d","sideEffects":false,"peerDependencies":{"@envelop/core":"4.0.2-alpha-20230915095429-a92ff55d","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","engines":{"node":">=16.0.0"},"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\n`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 { execute, parse, specifiedRules, subscribe, validate } from 'graphql'\nimport { envelop, useEngine } from '@envelop/core'\nimport { useDisableIntrospection } from '@envelop/disable-introspection'\n\nconst getEnveloped = envelop({\n  plugins: [\n    useEngine({ parse, validate, specifiedRules, execute, subscribe }),\n    useDisableIntrospection()\n  ]\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\n  incoming operation. If introspection needs to be disabled/enabled based on the dynamic parameter\n  (GraphQL operation, or, incoming request/headers), use this function to determine when\n  introspection needs to be disabled. Return true for disabling the introspection for the incoming\n  operation, or false to allow introspection.\n","readmeFilename":"README.md","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@5.0.2-alpha-20230915095429-a92ff55d","_integrity":"sha512-p4O7HLVkgrhs5O0MYhET3T6JHroqcVR32TAsttbG04KuenQFfv+c8RDY+NIgUnWDFFv087mNK6JEWwXof0DSsQ==","_resolved":"/tmp/631eb0287917693bee3989f77c7f0554/envelop-disable-introspection-5.0.2-alpha-20230915095429-a92ff55d.tgz","_from":"file:envelop-disable-introspection-5.0.2-alpha-20230915095429-a92ff55d.tgz","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-p4O7HLVkgrhs5O0MYhET3T6JHroqcVR32TAsttbG04KuenQFfv+c8RDY+NIgUnWDFFv087mNK6JEWwXof0DSsQ==","shasum":"1caaa70460e44d5c03405485793702a1f34d8f8b","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-5.0.2-alpha-20230915095429-a92ff55d.tgz","fileCount":8,"unpackedSize":5741,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfUPhsAH4ePZdWOYEnTC7tqleGREMuuS+rGu0PY1cuFAIgSiOctfhLZTSKo+Dd03/K4PzJ5O19wlUKloA7JT3LB+c="}],"size":2288,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-5.0.2-alpha-20230915095429-a92ff55d.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_5.0.2-alpha-20230915095429-a92ff55d_1694771720326_0.9736024251865396"},"_hasShrinkwrap":false,"publish_time":1694771720524,"_cnpm_publish_time":1694771720524,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}