{"name":"@envelop/disable-introspection","version":"4.0.5-alpha-20230212062644-e404badf","sideEffects":false,"peerDependencies":{"@envelop/core":"3.0.5-alpha-20230212062644-e404badf","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":"e404badf1f5ecf0a0ec14aafa555ca0297c35630","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-20230212062644-e404badf","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-wbHOs7A/rIvyCY3sR7DKFiD/tTkYmlqdrfYNUCkf/AQQDAxFm8y6ZzT2ee/eN7maZfLoYN28B1UaIQfNeXUEvQ==","shasum":"84e2a9c6ddb0fd7b0124521273572415c01699b9","tarball":"http://registry-npm.ywwl.com/@envelop/disable-introspection/download/@envelop/disable-introspection-4.0.5-alpha-20230212062644-e404badf.tgz","fileCount":7,"unpackedSize":4610,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2WUbHw4TtU0G/9YDAR1HxJUMX6CSEGgoXmdV9nwbNAAIhAL8aWhhMotusS04unQXeuzi8gvnJkPCu3HmL9Tu7OHdf"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6IbKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhWRAAoGl+yJ58PxoHaOMphOW3UuaCGmJQFWn23oqEhFRfDKnoZgo7\r\ndmm7Xu1ig4O9hn3z3dLD6rT0NF7i0IcneVQIzLwbyfniySH7EB+LFECnG9xr\r\noWsg18iMaGAABScwcIlRrg114tc/GGHqD5dTHkklhsUWqNUhMjmxCm3Uv85a\r\nPvN4eLn6p41loxPnmmHg61dPqaSJVH6vunMGKmrZ0tcLf/89FZTV9kx58wLO\r\nWEn/dxFw+wLjY3RJ9N5VPPgi2fRfUFW0YruUQABF7jmHSex/yqHkTNMmZRGs\r\nRqh/0eV7qbiBBYcTvknw403JEFxnOhhsDaVnQiJqIZF33VSJs0QWVhznp364\r\nnqKCqGFtIBQ1MBflephDUpXiWKwM95csvO8kglYG5BmeIsP1WZ2ogE3lzapw\r\nZ+xMz41CPPs9MgvUUTqcdpiSio3xbVhXS2Zpgh1dCfgM8wMDNWs8RB03+n/v\r\n62+eRKhyP2Wj6EFhi2FpnVBWl0DtP3k4o2LSM8coeJZ93+L9lqZJri6eVF7J\r\nXDXLbQJy0ykggDcmY14h/B06Y/5/BS0ZuAdawZo13Aiz0592OYkc8v8l63vq\r\nm6f6qL8IKwKo+V2PrGsLvFMN9picBDj5xID3sCRsOAuOvyLVE5OoSU1pS/KV\r\nt+RD9lQ2C2UwvSguU2QJPDkjQ/MPTQ6ueJ0=\r\n=DfO+\r\n-----END PGP SIGNATURE-----\r\n","size":1563,"noattachment":false,"key":"/@envelop/disable-introspection/-/@envelop/disable-introspection-4.0.5-alpha-20230212062644-e404badf.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-20230212062644-e404badf_1676183242453_0.066892638293236"},"_hasShrinkwrap":false,"publish_time":1676183242628,"_cnpm_publish_time":1676183242628,"dist-tags":{"alpha":"10.0.0-alpha-20261019231601-b21e6cedc1a444383d9ce69fe6180f5b4ff67120","latest":"10.0.0","rc":"10.0.0-rc-20261022165416-7c29decb398764e6ac3915e1c539c478cbf19237"}}