{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212063510-a5c5445c","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212063510-a5c5445c","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":"a5c5445c67c4a0fda0e88f05666bb0f6287a2cd9","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-20230212063510-a5c5445c","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-/6MK899orb2p28nYGudUWic2TlFJufhF2sacppVhM/uftBMLehOqOOJgdXJ/mhWoYiAvFywmVRJ1oFTr0JYG8Q==","shasum":"0596c51d4f073310c3ee6e9a41ef65bc7e5ae6f1","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212063510-a5c5445c.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA89C6XnNQscOzZKDtH4hQp1isFjPfeD19ZoDMVmNFFiAiB5Asi+FN90A21bEQ9f8Zq6JPr7ayxuksIUjI1aBrEd7g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6IjLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrG7w/+Lk2/PDNfZSFBowHXZdaLhuerp0O4jOps8EGwvdhoVhueHLkV\r\npd593emJ2OnBQmBXds/UP7WlVKW6QicyzlJ31jhFuONQPxgHlv4xiE0DUD+T\r\n4pmd86KUbx2JjYqbacJThnlihiNlpbVpZWX1cZbr7KdnXVnYgK6wIR1qdMYg\r\nzT58o0AnScuH7cuNnWUEqSboxEMt/q0mUoob8VFn/cbmQn7+w1tn2I17imNq\r\n3C60H1uozi00v6Zb10X0mXRa39duk71mkuw/IOQnBQlk+kynkWnMKuOiuOpI\r\nOPaH3bo1tCyP6iEB9gRg3QkI+po+5VkBlQHILmkdVvHZOvdLC6IfKtq2ZiqN\r\n+CxnrteZjBn0HDclXIM0cIXn4VJM5L4myOe4ujoFnnu2Qq1m3aSiUbG5NmEG\r\niE/E+b1t88Q2PH6bE2vMW9ERIXCv8GZAsTasSC3hBI6XPlXNWi9EW6tZurdP\r\nt7cRgQgp2znPQ4G/yryZIq2r+C6FEtu7sflIf8Spyr4LfighfeHNJGEvsdiy\r\nGA5nxJdPdpdgK15kzOaC0EM2QFhORZv+3BWh+2y4EtPeGWsmzuUEqmnQeQhT\r\nzR48/x41asq6UkGjTnR6XZEOfU9Ebf0iOhC585zk4adQdrcYPvkpZjWPleoo\r\nanETxFF0bpK3T/Rv1YuZ/3rsUo7Adf/aGHM=\r\n=9FWQ\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212063510-a5c5445c.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-20230212063510-a5c5445c_1676183755380_0.2176668430235067"},"_hasShrinkwrap":false,"publish_time":1676183755536,"_cnpm_publish_time":1676183755536,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}