{"name":"@envelop/disable-introspection","version":"4.0.6-alpha-20230218015643-3aeb66b3","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.6-alpha-20230218015643-3aeb66b3","graphql":"^14.0.0 || ^15.0.0 || ^16.0.0"},"dependencies":{"tslib":"^2.5.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":"3aeb66b305cb64cab49c226f23cd1e58b70c1c22","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.6-alpha-20230218015643-3aeb66b3","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-BYdbuK2MDEy1RXFZMbQC/giR/5N/4HaOteMxtvbEnNtIz4fp9R6cCyHrZz5TD18nGgU/Jv1PBK5qIuKmjm0+Yw==","shasum":"bf756bbe4b75d108a6cac3574977369accf0353c","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.6-alpha-20230218015643-3aeb66b3.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNZcAfvG+cGdOqrs+NFZpghqIpDeloOWY8xR6/4Y2LGgIgEkwfz0k6dJby9hX9Ym2euEOz+hIrfFg2cYz38LG71ZY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8DCAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqmrxAAijF7HwPKZoMfm0anhqgEFjsrc4tem1UYkJkXhCxFdh3kSJFe\r\nqI3DxcLwOPBnMD8oOAlPdjblk9x02sLjwheFYH/T2fKDzz5mdgrb5YT9Dgvz\r\nozPBCk/hT1EdB8+IDWaocPj45R0qZe73Jd3L5/vFKn8HYDgL7LcqSQbK9VVI\r\nJrgpm2D4qrgWSrqETu4n/5rb0BJscPhj/jdojqpm2HlA79V0GN6GnacLKdDO\r\nol600RbQVcY2Ya78ejAm4mYrSYqICCwUZjHwENkW183nAGsyTkpgvnI21vGQ\r\niievXMiq9qpzvCynMMN4B/9VujV/CJvAEYfjvezZM1gHriQzK2dkAs5LzQjS\r\ncuHrtPSwsU8niJPs4bgESPuSZFC/w6oDLXAGLW3Ab3pNiEkNyXaUhh2X5Kec\r\n1GA8LCbOFS7+J+ASX8edWmF8bc+psiF7RT0z7Tve55fKtKoYCcoTC+WOLxYy\r\nd1IYZJ+32++2zqBFgGRVoxXppXT+AJH1CIjA5WANET51niIj6kNapeMGQeC3\r\nJBe4JU68t8hWq2r7SJLHrtj6bAK9RUBPJrhsge5+DrRQtRJp8LwnJy14T3iq\r\nI6065MUDIASm02cSobWrlCpNbmtivE6Rw+w7VIuX+gNK9TsZUogvDXZsmZ5z\r\nCgAoUb3UiHZtOyhcpHCSlbOVTxZA4crsHhE=\r\n=0kdK\r\n-----END PGP SIGNATURE-----\r\n","size":1564,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.6-alpha-20230218015643-3aeb66b3.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.6-alpha-20230218015643-3aeb66b3_1676685440313_0.3769192291769925"},"_hasShrinkwrap":false,"publish_time":1676685440511,"_cnpm_publish_time":1676685440511,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}