{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230211194338-cec75fec","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211194338-cec75fec","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":"cec75fec96bac9011869df7b330aa2394b058dc4","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-20230211194338-cec75fec","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-S237DQVxpSabAbXVVECC7cclAPnoSiYuIDxGyDmGrmBfRbr37IVfjCC5flXkKOlk4nKb0Nm9xfXwtQKopl7O5Q==","shasum":"78d1c0380b3baf2353934895bc0bd4366b8b0a63","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230211194338-cec75fec.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVpPy3zawRhU3DOFhgFTmdVZBZeHZyKey9KL3wKI+ZsAiEApg01QVRnPY5sSt1yqCnHqE+4nnTGZLe9o3LnPXhwQpk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5/ANACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9sw//aGpp2+LzTR7JZlD+XaVTLIc81tEy0Gx3RZP6wovMrFgVyGM3\r\n7OTnrM35jjmGZ8Y3ThweU0CUL9LElFjKYqXU9x9nU/U5Q0xFRlhbe7o0RZDV\r\nYYNJFtwX5xdCLjZ+q1M7HHZVTuuYNvpWb8bp5HDg399iZZGvSfmWGM8l+cXq\r\nbhsWJnz2gc0j7UJesyKqg+y471ckp3qv+xYT7/Aikc7USiyenHirOLvcxF3s\r\nU/2jSSXccBQRK/F88xIKdQ++bO1hl7J389HDFnBJMsOHX6qHS5KRped8tAbW\r\nQ1nnuj/45wXbF9bfcfkojkwzjzULj7td5gAeNMcBdLWBAtSKSmIOu/KfNk4B\r\nxdU2YcwQVJ8fVySLy+MjD43fY1P7/nZzKCVr/DXuRirutRJDXo7hlwEwp0Jx\r\nbazhFYGFX7Q8BrSkwab7I6D1V7W0edaInfH4wsUoWvTHkl/0bnR3HSnPfNQs\r\nKn3svFmN/0PX6//Km2eP7/DDfAoBpIDJt0NAt82P8zc0PBEWi+RVzX4I7GtV\r\npnRQzOYyh3nyifm0GCdCyjQBI6pN4zkDcrCbP5omVjPcOiFZ4oxpjMRarzoN\r\nGxG4KTPd/cNJwPWcxet4n1cP1EJVO4guyerTOB468m7opz6W1oXYxxY2Ppb/\r\nayYwbsDdhKWjIbwUQBmaYTvcaQKyi0C3GCs=\r\n=3598\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230211194338-cec75fec.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-20230211194338-cec75fec_1676144653136_0.5927643528693614"},"_hasShrinkwrap":false,"publish_time":1676144653328,"_cnpm_publish_time":1676144653328,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}