{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230211150526-842e8063","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211150526-842e8063","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":"842e8063df9c0fe37108e9f0edee5f793681e25e","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-20230211150526-842e8063","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-e6fFYlIVlveyXk9SPQ/e0CZwVQtwMUMfguf/wySzVbxvnvzYgfwJhG1uZ+l2pISemy3UH11LDtF/E5kYbkZwnQ==","shasum":"634ef16b453ac98dc9bc0f2dc195f223ef71092b","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230211150526-842e8063.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC4F7VJ69A5+CtH39I+sGgZUNEXiWn4BJt4hmkWbcgmaAiBdoCED8GofMYIExdgtMX6ACrtv3+2C9VKBEueCb86mvg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj567kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQJQ//dA0qiw7qSY9c1R2w+OhNGd4Y4h4NGMTsOWlGe5Kqk/nxecZf\r\n1emtQVhbsezPZ3NOvv1yUdA2yECMB+nEporCydYKuPgB9V3bp9MBl5AEzsCN\r\n0QSsz1EwGTIkEcfN6rUegIQ1QNJxessPdQWo+UTufqCX3GiACFs0xpqxn4Vw\r\nmC61ve0kVSvVUUREsOK0yxs4cv/PEwMXDMRwYremVK6nh2jRt5wLN+yV4GYe\r\nQ4sFph+r9Zseb19v1nA1c9ShLDZpaZKyRqFujY/MOuzSHLYW363Ml129h/7b\r\nh+0QGm7PQEWPTFWND18oTFyBiES3CJ7CxUoCepaPw+55BHDgKS8LxgogvNDj\r\nwCIw11Phbv7yCm98FO5q4VdbO/nNie5teWAUM/gi90Dhr96sVI2gNvDxGJfT\r\nx1gS9QV4fPAEg4Bj90y7tEtPy7QQ+4hHQFko3dvYpGBdiyh3eyeEQVT6EcUL\r\nEJRyPlAdL3EaiIlerp6/sxEziVq1n4lM3a54EXkdDhXAxTYASx9h5MTs31jI\r\nWlgTKLyWJsKM7nkhIczZ1BduZb0Dcl+ClXReDxbt0DB5HNV+sD9pUV5Q5PGa\r\nwCEXgWs0//TLxOVLp1dyfPxj8BmH+ZFA0n241CKsConRczKsJ/rYJeULH7/O\r\neRmN9j1m/MNRyiaYlAKMmAJhpT15NwTJdPQ=\r\n=lYu/\r\n-----END PGP SIGNATURE-----\r\n","size":1563,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230211150526-842e8063.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-20230211150526-842e8063_1676127972328_0.11286005676842237"},"_hasShrinkwrap":false,"publish_time":1676127972596,"_cnpm_publish_time":1676127972596,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}