{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230214092937-a816114a","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230214092937-a816114a","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":"a816114ab17e1eb77eb693035adc5809754fa3ae","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-20230214092937-a816114a","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-0RYU5Qg6jXwXBz9YqX/ye1++Fu7gIFHOu9OjrUumnWMd0ZI7/n2gyZB5BrlFInM6k1cX4TCI2gRlNgibDuMWkw==","shasum":"57094335b9901428e229986d09a6dde1f0c9ffdc","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230214092937-a816114a.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqV0PeRurWcvKaobKxQsfis3rkR5GT7E+tniuLlVjkOgIgf/gpHwQQxDyUl2b2B3DqNJfqncNN4XCToHVFTntHg98="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj61SuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHag//XTZz7Q/A0Y7N4hgLdtw+MjJw0dEit1HH8nDnkSKVKL9ru8Sx\r\nm5o1RHnmQvVrGc2KiuNOSv4atF3ZGrTkNCj6pt5sQJewC/1+60IIP/KGMe37\r\n8iQEg7yGjYG/dwFq2PKGADU0eVds+VIVtRfNaX5y5E50sqgck1ms9+FtNmrY\r\nVib+tQLYsqmW/qXKHhDd26pCQGmsfY+fXL6Hb1rK/qR/IeWRlLk8lD1aXafs\r\n4YLv+lrTdm4Y4+JSw37CulOYIhpAAwo+8KCM1NWjKmBrwDN96lXwWC4FWU9b\r\nkzm8y1ln9tvtqymETnDjiihAeJ6SOvtGhwVYJv40u0NPGjq4ZPyunBS08hH/\r\ngNWWBlMBCpz3x0Doc6dbJwRVbDTSPEXZ31Fc6KqndZUDVUbDwQl3ZuHMBMxp\r\nL9ZgTKMjw7N05qnGaUzAG+yLwkLogCelleFQZlIJpkYIKAaiHUBSUdopAEwK\r\n/m0cvV8WQCLe2EXNLXOpDU+6bIIxcq5GP5WM//H5ch37COTlgIXKWGe9jn8b\r\ntdVDmS7Y9xY9Vy8+3ATFeUkMKtTUwCEhYI3Zn9ukGZO2ET4fa02rBBMdHi/T\r\nM4FUqDyu8gGsbuxNLywHpP6HJk97sMbNBSm4THQCibdgMBM9j5v2O7JxcZwR\r\n+7mkkUPr+364Dbj5cKVJVuNZvpW3WTeh2u4=\r\n=xTmK\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230214092937-a816114a.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-20230214092937-a816114a_1676367021831_0.2341385985125224"},"_hasShrinkwrap":false,"publish_time":1676367022034,"_cnpm_publish_time":1676367022034,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}