{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212012714-82f083fc","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212012714-82f083fc","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":"82f083fc8ef6b318cbe263a2bcfecdd837a7a27b","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-20230212012714-82f083fc","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-nrW9knTuE2A/Ebx0VWSQl74GIz+kyEtXSQ+FBhnQhyy/+bYdf4H5J0WGQSxf+6DRmwQAFCoRM6eob+D2xMVN1Q==","shasum":"05412b31dbc7778cb4df02dd02b1d669eea4dfc9","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212012714-82f083fc.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFOW+zR5Jk76roAVbTAneYuq9kyWiO3wzFsBueAPWH3pAiAnSwvyI5wM5WGK/4afoWdJbP3fR1/SydHBCoRvi5mHXg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6ECWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroTA//dCFg//Kdu/2iy8xwo7DjB6oWh2poEG1hgQy2sjAT/bpNkJ6E\r\nHzFa5g3NZ9omqQhn/fHMAG6xG+lWdYRdGewWM0K4K9KXMBOR6suw25eFdif4\r\nQmAyKCfDqAIxcY0Fz520J4TOF1vtQa8ErDcMocumR/oaFp1x5n1p6gWRL5/x\r\ncUgzzSUsegMyZPl0o76SVkIWmhO7jno1SM9ar4hqX9xW3eGNABZUOsVK23vA\r\n7nGsM2GXNcwa4iJDpK7sSiMeU1gPAjk2YFCpQUt4gLcM8a70NWIpsuPHCsoG\r\nxSdOtbwejkAhX2zwXfWyG8I6UGG3ga2/YuI4L5w2S/LednTLV28c+4HToYSa\r\nezTz9i9B0sdWLNdDBh82rMJT0ptmJKBRy1CReil+zqCHNtMJv++zslN0d5jH\r\n0ng7OuJK6aki69EPmLhdcOKnBQ1qQfuZp8uwcq2oA4c76y/p5BnCfcosLDg3\r\nKTp8B+cIaTRmGJYhvudKD8DIVmfZV9M6KHiJ+sFYMk4HtWI2W1Fho/up9phM\r\nMTa/mOvT6ZmpSWdb1rZaB7TD7+/Wh2jSEl6oMOXgMX/ZlaoeQjXSL4drsnIe\r\nixm66MQXK0c+MOKxjNjtDDaYI/Wq1/8R/kBTDj2FC5LEfrKmvCIL+88BSI8I\r\ngfILZI9Ug6FRE0CeeuL8h+FcDCdESbeH/hI=\r\n=dRAD\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212012714-82f083fc.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-20230212012714-82f083fc_1676165270073_0.385920897788661"},"_hasShrinkwrap":false,"publish_time":1676165270299,"_cnpm_publish_time":1676165270299,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}