{"name":"@envelop/disable-introspection","version":"4.0.6-alpha-20230217150201-9434ad2f","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230217150201-9434ad2f","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","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":"9434ad2f8d56030d18bf1e97a75053ab0b15dc60","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.6-alpha-20230217150201-9434ad2f","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-I2nKNhdg3Wdj7cXwU9OqUYVkvtcNsSCL6xlxZ9sWhj84zFyvX2xwdvqWpMKmnR28VxkEI5tVp5r0jLbeHXC/dQ==","shasum":"6a72260adcf4b2bc5de3f78cada25e5a391c5e53","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.6-alpha-20230217150201-9434ad2f.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiCLMHnB8OEkZSXWvI23wVno52K8Ku6GEoL9W0gPbrZwIgdcoPPWe27NgsTJbymY7TUf/o7oXxbGz0Uc2VUGXmdj8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj75cPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0+g//Qp86ew4P1CuKL+JL2WWAV1JdN07aZdbXXXJSlnwIPiLO6znA\r\nu03c+aDwrjy9N9WaIrpMlO4Tja5TkUlqXTNld2VEwmOxHfJYqU3eA06Kvpf3\r\nS53hFItLkaohXJrGxs5j38k7indo7suakChhmZ35TsuejW4NlkLzrwhwEiFe\r\n1uOn0Fun/sqORaRap3NF1xy5W8yGHycsGr9Z09KK4lHSXvf6mLhmNS1Fgukg\r\n4/yxMccc7bGPFVKSD4SlaKSMAbNoLJ4Yle0LPoUUevVcyeb9mNy3nL9iduDL\r\nJnk4aMU8Ydk0dCt3oI+7vkfPATmNWG/PHWFhnBeNtmTg4E3vYIb2DDWbYnAy\r\ngj/pv7bRdg0f//Ca17xFzGDuGlQsc7+3rYhX+Ga9vcPgCuZL+pRi0i0Dwegy\r\nfWQ1SVSlULvtBtd3CQpAJ6eajDe6fP0TemnuqYzZ3xz6Y0Y94wJ2okNHgkZ6\r\nHhJTtwfT6RH82Q2QA3gzZi/H7qLuSZq1nUKeGXcFzdYAFkiUaxkACXrFSn7x\r\npmpsQ3cMfRA3JFmOcw2R0gr/ObcPldVJW75im1/tamEHwqKmP334gsdPcjt9\r\nM6+nM3VNp/H19rcsUlj4IKW40TPMs+gKYycxbGKjU88Zyl5UryBK2krSS6tN\r\nXNHupn3RnarXw3IfxwAx6OChLOPhC2IQSZg=\r\n=Uuxd\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.6-alpha-20230217150201-9434ad2f.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.6-alpha-20230217150201-9434ad2f_1676646159397_0.6701505900401175"},"_hasShrinkwrap":false,"publish_time":1676646159554,"_cnpm_publish_time":1676646159554,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}