{"name":"@envelop/disable-introspection","version":"4.0.0-alpha-20220928142730-aa29e80b","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.0-alpha-20220928142730-aa29e80b","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, 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, 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":"aa29e80b702cb747f8a245261709b502f633cf33","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.0-alpha-20220928142730-aa29e80b","_nodeVersion":"18.9.1","_npmVersion":"8.19.1","dist":{"integrity":"sha512-wU36CirLtAhrbMaUckwvNqJY08vdPu2IwRHdl2Gpv8McOqgQ6NfnmOd1B5Rjhs9+oWXEDgo0sTODDgNT4x0EOQ==","shasum":"40d1410bee58c0154c3282cffa43ab3127d49620","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.0-alpha-20220928142730-aa29e80b.tgz","fileCount":7,"unpackedSize":4578,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHZ3ufP4oiwiy7N5DvOX6CNIOGwPYTRQoEmIed+6WaShAiEAijRayxSEJAy8og2xviv7IMFesZzpWJ5orbV00h9Et3E="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNFn7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3qw//YOOnZpeXtyGU8tY8VeEmNb+X/lVFF/sY+xfWWfQBiM7y78QO\r\nUu3LfizIw9wx0oO7X0VvUKduwzxqLz7cDWV4HG800jpv3jxtNA9n8v8H+//W\r\n5Z1RhZ0vveOHj/XhWAf4nEIgrn6bbT5Ci8Cut70iZploFU2F+C9rZICU7kVD\r\nj52PHPTvOI5UQLqIvSE5dYLTY4ixrPRwMvvH1/T9k8Q0avdFUA9zfVArVtYi\r\nSTsN1THlhH/TLLRlIFGFJbaCZUSt1DKFYr04twNCwvoDXUA/TbE+MQDVrAJH\r\n8x5tmLDjzwQ2E//G/IeFaoMruXaAQHJR8oH2Bfmk79kPWmN9oS28RiOZnlWj\r\nZLnurwXPgY2ogzFweL7jz2f+BJbyj44t/FvvcZS/sUuBFkbmDH1J45c8s13J\r\nRpbioP6dktuSffdPsWL5BkiuQftmltt1Z/mOIfeqbn7iER+voKJZzdR38239\r\nLZ6dHG6bY+6rGW7xgn/xIYATutJtdxjdieQ/mKRvH+OXYjpD494onJYfgzy/\r\n+Y66zt+sSi2fsjh3xmPbb49cKkd4i4J0DQeVVDtSIq/fCQD+Ez5hTQOJer20\r\nLIdeFXmazf+wMvGfspHdjZejjFxa+zzBD6I/fjv6y0qS5wZ9ODuWu2BZtzTh\r\n5aOITtaJvS+RVcbZbdYeyNGNpPv19WJrnq8=\r\n=ditO\r\n-----END PGP SIGNATURE-----\r\n","size":1556,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.0-alpha-20220928142730-aa29e80b.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.0-alpha-20220928142730-aa29e80b_1664375291289_0.3610792762276367"},"_hasShrinkwrap":false,"publish_time":1664375291452,"_cnpm_publish_time":1664375291452,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}