{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230211182453-a6494814","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230211182453-a6494814","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":"a64948148039a5e63bed6af65d37fcf8d8afac40","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-20230211182453-a6494814","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-ubl0K8aDkFMb4iny7vmZ6y2gxGl9K94xZ4dHet0tetk/n1BEO25hTPJKw34ZYXVcMx3OG6DF24AQ07AdAiFctg==","shasum":"42a81b5608d4cd3fe2ecf0a507228cfed8754cdc","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230211182453-a6494814.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGNwuoBfMqnZeGPPvMGyo6JZyxU9ISKe5jOAfQdzehUsAiEAgneCkWpj84HVT24hLeklvE/MYqb2n0ufylRwvPzelhQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj592XACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFYQ/+OlA5C3FoyaKs3zl68aFUdA0rC1EMB4if3HkUyNHUnbVANzBG\r\nNe/aUpYFITDEWG24Xm46HI9K/vlRFJeuwIxQ1WQysSXNicFUo4L54zMHWgDh\r\nRC9PuWWw0oWt64L5gq6stSTGpNKR1m4P2pEsWNbX6DbUwiASNUvmWTsB47tM\r\nhEkQh00lSv5GDiEbQxnVsO22DwW+PHjBks68COupQi+Rq2wFlTU2mmzh43C/\r\ntE5Fzy2LIum1xKaYXXdsNrJQQ+HVhJsfPmSkBYvdIOLiQtA2uWR/agr1zRCl\r\n1sTEjsrh3Isyh4f3WnfvIHTVB/r28LSaHoVzEAOucYuwJLCpAvTe5GIfdqZv\r\ng6+/tpUC1iTlwiHRQVK6gdvqK5rdaodDjmXKnYSLRjsWObHK5fg2rozxe9j7\r\ncn9t+WxUOQ86JRECBfCU2T49x+lthGOMYwte9Gi+BGZAMpxVkSJpzk2PZjCi\r\nYutXGbKua1l6ryaAPX7UAZVD8TSZIXJbwKSaaSJ65WAH0U0TVfA4Pk2iU80D\r\n+j75l/bYfC1LopxnFbM3lVmdJl6wqs+fFtztX3wFxJj4Hl9FgSVH8DzDsda3\r\n+UlTQagZ04iyLeBa+M8131PDTOgTzH8E6blmtygOOSnDUJDm7EbLKdATNeeF\r\nOALgBGcMpbhkqeUg4FYs65UmZdwZLpQowuc=\r\n=HHkM\r\n-----END PGP SIGNATURE-----\r\n","size":1565,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230211182453-a6494814.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-20230211182453-a6494814_1676139927075_0.8989612138802028"},"_hasShrinkwrap":false,"publish_time":1676139927215,"_cnpm_publish_time":1676139927215,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}