{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230211223605-71fe097e","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211223605-71fe097e","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":"71fe097ec289e0da5e04af92cad2a950fe800b69","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-20230211223605-71fe097e","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-vldt/4ERLPGrudUVgB83sgbOdgVIDDtZT85z0RLGi6045krhKkQ1XDoQI8hzB5J1FGmuqtKZv2fcwwimtbIoOA==","shasum":"3ee50cd9a4452e43ccbe62c0813638a56fbfc647","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230211223605-71fe097e.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIED0DuQqMJLRUnzC+gmurm5vOEDdtk0+zCRRj2zMXJ8MAiA0PH8K80ESHPDbCD1y1Bwo5n+SHsEN11afN/UecqIcKA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6Bh5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr5CQ//dtUOG7cv1ThTUdJW+HzQq+Epqe9OsoT6soIYDrvr1mcH9jGY\r\nhbWyGtfbbzWJlWs8AMxDsz/xPYNwD3ZsNhUGmrgKTUyw2UWmDq/kv7OGO3Qw\r\n58V501oyEs1SWbriS1jFmX7OhzO0z+itvd07pGUzOcxuFPAmJ1pV7A+EtQ/O\r\nS4abjFKdo0svrhQCyew/rG/t7liG4KQtzPyBaC7t4fk/+EMvlG8U3xTNrkXB\r\nJqbtzwoGyVSBKo+w4JdtIhKw2krNkjyeHTBvfmwRHcYX04hDxtDytVJpb+aq\r\n4Iu4vY1KEG2WW95D5qaMS0xEy9xHii188bUWRdU6t9JHcZ2YWi79BMFSfAFI\r\nRPXJ5GRAj3xd+a4w1OfWhAqoiFM+19KxVrsbfHEpzxj5KNmN6cQTZOugoYO/\r\nwEYS7uQGdD2an6rzOGxNifLVy0JkqnS+VHq86WWmSKyUz/Q5I3JixMN2UiqJ\r\nPr3wx6PUbn2VEI8ZXP3UHTtBmwfMyNhq5+GHljTViLsnjQPUSPW254VsV0+U\r\nm3RwZlYZsdzwVRn8IBm8TxC2W3VNqCCpp3+tsTtOJh4YcxekfwfKBPLfj+jE\r\nmcYm6YWO9Ghh7k7qmEDAP2cBaFysosb+8SqCAEXQ/wwIJ1eMu4Ggnx79CVjf\r\nZ+ppqIeM/mc30djk/hNZGgKOVmdATpJeUfY=\r\n=vL1e\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230211223605-71fe097e.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-20230211223605-71fe097e_1676155001712_0.12645220530972057"},"_hasShrinkwrap":false,"publish_time":1676155001900,"_cnpm_publish_time":1676155001900,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}