{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212092126-4e791a31","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212092126-4e791a31","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":"4e791a312cc650fea6d0bbbdee6611d0082dc12e","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-20230212092126-4e791a31","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-x6mAfWRc1apzV6iqr8FQxhGieQEczThaM2VAGIRAbVBfQY3ieQF17gmMXDV12oC4N1Lv3xfWO3q0snkuMnuX9Q==","shasum":"b48887952baf22db5ab5e5f4e033bd52ee9ea63e","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212092126-4e791a31.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHN06z3XZQgBIl9MKFEdgKqVlrSiN49qVFyehpNVgo1oAiBdXUQiZYKDBsr2N6dJPwyZGiEVZ1vJHsYrQJhi8C6yBA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6K+5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYPg//bk9WfoMAlolSY/uWjcK/CD+5l5OkfoGMIjAFW0E35xynpVUt\r\noq8WuBpxm9LlNpyC4NmSUif0MAPsDNUycnjPTqF1tuLttcc57ZZFqwiTEpeE\r\nzwLn69Bz0uSS+6i2LJsjxkEylMY9Y+eV3Hc50+qmiKa6VT4XVw39L4x/Wx32\r\nTFK/Qh+Es5rXWUKPKdMyHRAo5aspzF3WNScqhWFf9uiacw8KP693EshcQJmO\r\niH6hsaa69BfLzqGBlL9NIUNA9AjkSKHj9n2+/mCNVn0LjaWBPt+YwGohEAn8\r\ndHSDS/lExHOPfjrk4J7H/3XynqX2YOC7f9U3EcFpsvZF5emCCPxaUBpfq4Qy\r\nADKOgt2YRcUeiT9+RT+wMSIe7xjvpivslW14Jlb0ghBwC0wsgG7Lm2IDmxCQ\r\nULazlSnjIpu22m/IqBFJzeFXJCi/nbwyYPD2SeMLAfRPELd01Y0Su4oeBiM2\r\nP9+4Ky4+WFRLcJ0Y3x+yqLS4HZGT6mEya+waV7G7SJUBRrEP4UfhcooSnFqb\r\nlZ6fDyoKwAUyrI/pj3ySPKSj6f0OOVxMsE0IJGwS8i6ec3Zw0fCn8nrQFXsu\r\ngfPzqEfpoPTdZ+hQiDZwsjv1oVlfy+TVZRP6ZYln8C/nGbq5hFtdzLNgTALB\r\neoPzLmb3JzEyEbGCWzoS1Rvzp+KTHYU6qc4=\r\n=aVVm\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212092126-4e791a31.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-20230212092126-4e791a31_1676193720777_0.7711768740902449"},"_hasShrinkwrap":false,"publish_time":1676193720969,"_cnpm_publish_time":1676193720969,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}