{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230211192632-9a04f4a6","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211192632-9a04f4a6","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":"9a04f4a64b9c0ee6f7e9b3dd7dd80e745a4506f8","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-20230211192632-9a04f4a6","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-nCBDyAu18NlCL76bYs/CyHROT+E9gHbn1/AvS5Os9/E+ZU3roAMODnwZVdDyOD/Z2ztaxSMnY2BuY/cGTDqI1A==","shasum":"7f9ad664a2d7e05e8c9bb3951ebf97624d91401a","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230211192632-9a04f4a6.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWQ72qgPuwm95Dys9ncD8JTt69Qsr+ypEWrmKet05xzQIhAPAED4Zc9b+fNNjCsk+iHPg9gBKCGU/hbSbJ2PjDRDeK"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5+wRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCmA/8CWbZEmTx/qJHv8/fT5Olsku4r4NJt+XAfro4nb15dFxKQjQJ\r\ndp9irxVmFGhvPhUCXQzqZWyni2AvDBa1y5hqp5A1hZh9qw5noPXmSZjG2ekG\r\nrsumnhh1wgcaMphGzX+ANPcaQDhJLJ137nrTthlWQdEpaHGnefSprzeR8Koe\r\nUTxfoIYS5c3Keb5RVWMQPsQN/EpSEIjlkeV3pZVqdFO6ESeG9ZPcJyvN2i7M\r\nAsVe25aB2q0t9JLREyo5XtUBvvPjAiduQ6I0T0Zl4A3X8PUq3J7gbpmApTGr\r\ns20q0K/70NjwZ3vJXiMvhUW8puyAqjq9zVo8UbB5Mu2r/Z5b2srrTg/OyG9s\r\ne/gCkzyZ72v76QZAksWEove9nOdC98VRQeD1Eb8l8Vj2e7ZL0KJ1c0pK4xG8\r\npqLqHPWVeEJAoZ33EZ5FtTCrPcUOQjxFk4qBzT5IALHKC1+/Re24QSWK9wa0\r\nx4WF8yqfC0NkBBuvSHq1g7pQ1h/UnQAZ76ctr3g7ze8ROPJDdd2DV1JBlCR+\r\ny6TXjj52QIa84gE3o5a9PtjoCE01KHQi7Zm7RBN7fzaxfFMkE7lbBSB1NhWx\r\nMpE4o6GOG4z05f9FBItZW8Ke0lEMmlQiltsbkW+WqV+548MsAcHJXW71a71T\r\nrmbgP1Iq62ecYarcHLGSwmlCLItW10N+Pm0=\r\n=8uRg\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230211192632-9a04f4a6.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-20230211192632-9a04f4a6_1676143633673_0.07771834948259371"},"_hasShrinkwrap":false,"publish_time":1676143633839,"_cnpm_publish_time":1676143633839,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}